Re: [xml] writing xml to a buffer (using python)

On Wed, Nov 26, 2003 at 06:12:07PM +0100, Jens Dobberthin wrote:

I don't know whether it is the right mailing list to post this question, since it deals
with Python.

I try to write the xml tree to a buffer: 

report = StringIO.StringIO()
reportDoc.saveFormatFileTo(report, 'ISO-8859-1', 1)

but that doesn't work. The error code is

Error Type: AttributeError
Error Value: _o

What kind of I/O buffers are needed?
Any ideas? Thanks in advance!

  use report.serialize() to generate a string.
see  python/tests/ example in the source.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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