[XML-SIG] Serializing DOM tree to file

Uche Ogbuji uche.ogbuji at fourthought.com
Sat Jun 7 01:28:53 EDT 2003

> On Fri, 16 May 2003, Nickolay Kolev wrote:
> > Basically, what I want to do is to have what PrettyPrint from
> > xml.dom.ext writes to the console. But I want it in a file.
> I was going to say that PrettyPrint is pretty ugly, because it moves
> all the namespace declarations up to the outermost element.

Many people would consider this sane behavor.  I do.

> Well it's worse than ugly, it's seriously broken.  It moves the default
> namespace declaration to the top.

FYI, for those who do use 4Suite, Ft.Xml.Domlette.Print and .PrettyPrint are 
actively maintained and are available in C for speed on most platforms.  They 
should work fine on Minidom.

Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Using libxml in Python - http://www.xml.com/pub/a/2003/05/14/py-xml.html
Charming Jython - http://www-106.ibm.com/developerworks/java/library/j-jython.h
The commons of creativity - http://www-106.ibm.com/developerworks/xml/library/x
Is XQuery an omni-tool? - http://www.adtmag.com/article.asp?id=7620

More information about the XML-SIG mailing list