This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25028 - Should XMLHttpRequest.responseXML return an XMLDocument if response has xml MIME type?
Summary: Should XMLHttpRequest.responseXML return an XMLDocument if response has xml M...
Status: RESOLVED DUPLICATE of bug 22960
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: XHR (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
: 21945 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-12 21:47 UTC by Chris Dumez
Modified: 2014-05-20 14:41 UTC (History)
4 users (show)

See Also:


Attachments

Description Chris Dumez 2014-03-12 21:47:33 UTC
http://xhr.spec.whatwg.org/#response-entity-body-0

[[
Otherwise, let document be a document that represents the result of parsing the response entity body following the rules set forth in the XML specifications. If that fails (unsupported character encoding, namespace well-formedness error, etc.), return null. [XML] [XMLNS]
]]

Should this (step 5) return an XMLDocument instead of a Document?

See for example the DOMParsing specification, which states that we should return an XMLDocument if the MIME type is an XML one:
http://domparsing.spec.whatwg.org/#dom-domparser-parsefromstring
Comment 1 Ms2ger 2014-03-13 18:40:22 UTC
(In reply to Christophe Dumez from comment #0)
> See for example the DOMParsing specification, which states that we should
> return an XMLDocument if the MIME type is an XML one:
> http://domparsing.spec.whatwg.org/#dom-domparser-parsefromstring

Fixed: https://github.com/whatwg/domparsing/commit/eb55d5c2a8171cb765b063cac138dd291c00b37c
Comment 2 Anne 2014-05-20 09:57:36 UTC
I'm going to mark this as a duplicate. We need to settle once and for all what classes we want to use where for all documents. Doing this on a per-instance basis is not great.

*** This bug has been marked as a duplicate of bug 22960 ***
Comment 3 Chris Dumez 2014-05-20 12:08:34 UTC
For the record, Blink was updated accordingly in:
https://src.chromium.org/viewvc/blink?view=rev&revision=169080
Comment 4 Anne 2014-05-20 14:41:16 UTC
*** Bug 21945 has been marked as a duplicate of this bug. ***