From the bug URL: --------------------------- var doc = document.implementation.createDocument("", "", null); var el = doc.createElementNS("ns1", "x:y"); el.setAttributeNS("ns2", "x:z", "val"); doc.appendChild(el); var xhr = new XMLHttpRequest(); xhr.open("POST", "echo.cgi", false); xhr.send(doc); alert(xhr.responseText); Here echo.cgi is the following CGI: #!/usr/bin/perl print "Content-Type: text/plain\n\n"; while (<>) { print; } Here are the results I see: Firefox 3rc1: <x:y xmlns:x="ns1" a0:z="val" xmlns:a0="ns2"/> Opera 9.25: <?xml version="1.0"?><x:y x:z="val" xmlns:x="ns1"/> Safari 3.1: <x:y x:z="val" /> Ignoring the Safari serialization, which is not in fact ns-wellformed no matter how you slice it, the other two are ns-wellformed XML. Neither one roundtrips to quite the original document. Which one is "correct" per the current spec? Or is it neither one? Should an exception have been thrown in this case? Why or why not? If there shouldn't have been an exception in this case, how is a UA to determine that? --------------------------- JSXMLHttpRequest uses Document::toString(), which is a weird method, see also: bug 18421.
Will attach a fix to bug 18421. *** This bug has been marked as a duplicate of 18421 ***