[xml] [Python] Best way to save document to Python file...



Hi all,

I'm using the libxml2 Python bindings to create a document tree then
save it to a new file with "SaveFormatFile()".

What's the easiest way to write the file to a Python file object
(e.g. something with a write() method) instead?   I've tried creating
an output buffer then passing that to "SaveFormatFileTo()" but it
throws exceptions.

Any advice much appreciated.


Cheers,

Stu

--
:: Stuart Hungerford (stuart hungerford anu edu au)
:: ANU Internet Futures Group




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]