BeautifulSoup 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()

On 28/09/05, Negroup - <[EMAIL PROTECTED]> wrote:
Hi all, I have an xml file where the tags are all on the same line,
without any newline. This file is quite big and difficult to read. I'd
like to format it in a convenient way, using indentation and nesting.
How to pretty print my content?

I hope to have explained well enough my problem, differently let me know.

Thans a lot!
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to