What is the best way (or are the various ways) to pretty print XML in Python?
XML pretty print for python looks pretty good for this task. (Appropriately named, too.)
An alternative is to use pyXML, which has a PrettyPrint function.