Index: /Users/karl/Documents/python/Lib/test/test_minidom.py =================================================================== --- /Users/karl/Documents/python/Lib/test/test_minidom.py (revision 85491) +++ /Users/karl/Documents/python/Lib/test/test_minidom.py (working copy) @@ -1489,6 +1489,12 @@ doc.appendChild(doc.createComment("foo--bar")) self.assertRaises(ValueError, doc.toxml) + def testEmptyXMLNSValue(self): + doc = parseString("\n" + "\n") + doc2 = parseString(doc.toxml()) + self.confirm(doc2.namespaceURI == xml.dom.EMPTY_NAMESPACE) + def test_main(): run_unittest(MinidomTest)