PrettyPrint not outputing anything !!

Fredrik Lundh fredrik at pythonware.com
Wed Aug 14 20:06:20 CEST 2002


Sunit Joshi wrote:

> str = StringIO.StringIO()
> PrettyPrint(sXml,str)
> str.getvalue()
> prints ''
>
> Any ideas what might be wrong.

I'm pretty sure PrettyPrint wants a parsed document, not a string.

(from what I can tell, the function simply returns if the first argument
doesn't have a "nodeType" attribute. that's not exactly helpful...)

</F>





More information about the Python-list mailing list