[XML-SIG] Ignoring whitespace with DOM
Fred L. Drake, Jr.
fdrake@acm.org
Tue, 14 Dec 1999 13:42:57 -0500 (EST)
Adrian Eyre writes:
> On an similar topic, I noticed that many people have posted functions
> to add whitespace to format the DOM in a tree-like way. Are there any
> plans to incorporate these into the main xml dist?
You could use xml.sax.writer.PrettyPrinter; just walk over the DOM
instance to generate SAX events using a PrettyPrinter instance as the
document handler (which should be pretty much all you need).
Hmm.. I suppose xml.dom.walker could include a SAXGenerator class to
make this easier! I'll think about that the next time I can find a
little time. ;)
-Fred
--
Fred L. Drake, Jr. <fdrake@acm.org>
Corporation for National Research Initiatives