console.log(document) results in a nice tree view of the document. All tag names are lower cased. This is cool for HTML but can be bad for XML.
E.g. when inspecting the result of xhr.responseXML.
My actual problem was that I used document.querySelectorAll on the documents. With XMLDocuments querySelectorAll is case sensitive for tag names. It can be really tough to understand why queries don't match when the tree view that you use to construct the query is all lower cased.
Created attachment 94200 [details]
I switched the XML check from MIME type to xmlVersion property. Previous only worked if the main document was XML file, now it actually checks the object that is being debugged.
Comment on attachment 94200 [details]
Clearing flags on attachment: 94200
Committed r86948: <http://trac.webkit.org/changeset/86948>
All reviewed patches have been landed. Closing bug.