Convert a long XML string into indented format

Jim jhefferon at smcvt.edu
Wed Jan 25 14:45:54 EST 2006


Laguna wrote:
> Hi,
>
> I have an XML file in a single long string. How can I convert it into
> the nicely indented format as displayed by Internet Explorer using
> Python?
You want to pretty print.  Have a look at
  http://www.boddie.org.uk/python/XML_intro.html
for example.  

Thank you to Paul, I've found that page useful,
Jim




More information about the Python-list mailing list