I suggest using minidom or pxdom [1] rather than 4DOM. If you insist on using 4DOM, xml.dom.ext.Print(node) or xml.dom.ext.PrettyPrint(node) does what you want.
[1] http://www.doxdesk.com/software/py/pxdom.html --Uche -- http://mail.python.org/mailman/listinfo/python-list