#13276 closed bug (fixed)
In IE 9/10 $.parseXML() returning document object instead of XMLDOMDocument
Reported by: | Owned by: | jaubourg | |
---|---|---|---|
Priority: | high | Milestone: | 1.9.1 |
Component: | ajax | Version: | 1.9.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Ironically this is because IE 9 and 10 are more standards compliant.
The situation occurs when performing XML manipulations(specifically copying nodes between objects).
Copying nodes between an XML document returned via an Ajax call and an XML document returned from .parseXML results in a type mismatch error in IE 9/10.
It works correctly in IE8.
Please find below the test condition showing nodes successfully copied in all browsers (including IE 8) but failing in 9 and 10.
Change History (10)
comment:1 Changed 10 years ago by
Milestone: | None → 1.9.1 |
---|---|
Owner: | set to Rick Waldron |
Status: | new → assigned |
comment:2 Changed 10 years ago by
Interesting, when you change the dataType to "text" and manually use jQuery.parseXML on the response text, it works fine.
comment:3 Changed 10 years ago by
Right because the "built-in" XML in XHR isn't the same document type. I am sure some amount of fury will rain down on us if we use this simple patch but I don't know the implications.
comment:4 Changed 10 years ago by
We already switched to text only requests in 2.0's xhr transport so we may as well do so in 1.9.
comment:6 Changed 10 years ago by
Component: | unfiled → ajax |
---|---|
Owner: | changed from Rick Waldron to jaubourg |
Priority: | undecided → high |
Let me handle it then. What's the timeframe for 1.9.1?
comment:8 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Never use the XML as parsed by the XHR instance. Use raw text instead and let the ajax conversion logic do the trick. -20 min/gzipped. Fixes #13276. Unit test added.
Changeset: b83081ba644b70876a64b3abd7eb11109c1e7a1d
comment:9 Changed 10 years ago by
Fixes #13276. Unit test is enough since the 2.x XHR transport already dismissed the XML as parsed by the XHR instance.
Changeset: 4c6fb65d358f6a9795f06ec8d5ed3acad6ad795d
Confirmed. Patch to follow...