For parity with Firefox:
var req = new XMLHttpRequest();
req.open("GET", "test.xml", false);
var doc = req.responseXML;
Where test.xml is:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
Once we get xmlEncoding, we should start using it in XMLHttpRequest ("If the data is a Document, it MUST be serialized using the encoding given by data.xmlEncoding, if specified and supported, or UTF-8 otherwise").
XMLDocument.cloneNode() seems to always return null.
Could you please file a separate bug for cloneNode()? It isn't related to XML declaration properties, so it's unlikely that they will be implemented/fixed together.
Filed <https://bugzilla.mozilla.org/show_bug.cgi?id=361198> for xmlEncoding behavior in Firefox, which seems wrong to me. XMLHttpRequest behavior isn't clear either - Firefox doesn't do what the spec says, and I'm not sure what we should do; asked on the webapi WG mailing list.
Created attachment 11576 [details]
The patch doesn't include changes to dom/xhtml/level3/core results - svn-create-patch chokes on these, probably because of the UTF-16 test that I re-added.
One thing I don't like in this patch is that I had to add wk_ucfirst to both JS and ObjC generators - I couldn't make it work when it was in CodeGenerator.pm (calling it as $codeGenerator->wk_ucfirst resulted in something weird like "CodeGenerator->HASH(...) being printed to the output). Leaving this to someone more proficient with Perl for future cleanup.
Comment on attachment 11576 [details]
marking r- for reasons discussed in IRC.
Created attachment 11584 [details]
Committed revision 17859.
Thanks to the Safari team for being so responsive regarding requests for better
advanced AJAX support. Safari is quickly becoming a 1st class AJAX platform.
Mass moving XML DOM bugs to the "DOM" Component.