<a href="http://www.crummy.com/software/BeautifulSoup/">BeautifulSoup</a>
is a brilliant module for this kind of thing. Just make an instance of
a parser feed() in the file with file.read() then .prettify()<br><br><div><span class="gmail_quote">On 28/09/05, <b class="gmail_sendername">Negroup -</b> &lt;<a href="mailto:negroup@gmail.com">negroup@gmail.com</a>&gt; wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi all, I have an xml file where the tags are all on the same line,<br>without any newline. This file is quite big and difficult to read. I'd
<br>like to format it in a convenient way, using indentation and nesting.<br>How to pretty print my content?<br><br>I hope to have explained well enough my problem, differently let me know.<br><br>Thans a lot!<br>_______________________________________________
<br>Tutor maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Tutor@python.org">Tutor@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor</a><br></blockquote></div><br>