Uche <[EMAIL PROTECTED]> wrote: > Of course. Minidom implements level 2 (thus the "NS" at the end of the > method name), which means that its APIs should all be namespace aware. > The bug is that writexml() and thus toxml() are not so.
Not exactly a bug - DOM Level 2 Core 1.1.8p2 explicitly leaves namespace fixup at the mercy of the application. It's only standardised as a DOM feature in Level 3, which minidom does not yet claim to support. It would be a nice feature to add, but it's not entirely trivial to implement, especially when you can serialize a partial DOM tree. Additionally, it might have some compatibility problems with apps that don't expect namespace declarations to automagically appear. For example, perhaps, an app dealing with HTML that doesn't want spare xmlns="http://www.w3.org/1999/xhtml" declarations appearing in every snippet of serialized output. So it should probably be optional. In DOM Level 3 (and pxdom) there's a DOMConfiguration parameter 'namespaces' to control it; perhaps for minidom an argument to toxml() might be best? -- And Clover mailto:[EMAIL PROTECTED] http://www.doxdesk.com/ -- http://mail.python.org/mailman/listinfo/python-list