Convert a long XML string into indented format

Laguna ed_zeng at yahoo.com
Wed Jan 25 14:58:45 EST 2006


Excellent! This is exactly what I was looking for.

Thank you Jim!

My example code:

import xml.dom.ext
import xml.dom.minidom
doc = xml.dom.minidom.parse('myfile.xml')
xml.dom.ext.PrettyPrint(doc)




More information about the Python-list mailing list