[Tutor] Done -- Elementtree and pretty printing in Python 2.7
knacktus at googlemail.com
Fri Aug 20 10:39:47 CEST 2010
just found "hidden" in the "Schema change in Etree"-Thread the answer to
my formatting question:
ElementTree doesn't have a way of formatting (pretty printing) XML
files, so there can't be that many newline characters in the structure
(they may be in the occur, though!). There's a pretty printing recipe on
the effbot site that you can easily adapt to inject the newline
characters you need.
The recipe works fine.
More information about the Tutor