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



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

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/serialize.py example in the source.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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