Convert a long XML string into indented format

Jim jhefferon at
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
for example.  

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

More information about the Python-list mailing list