Skip to main content

Bug Tracker

Side navigation

#13276 closed bug (fixed)

Opened January 20, 2013 03:59PM UTC

Closed January 21, 2013 01:44AM UTC

Last modified January 21, 2013 01:55AM UTC

In IE 9/10 $.parseXML() returning document object instead of XMLDOMDocument

Reported by: yogistra@yahoo.com 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.

http://jsfiddle.net/yogistra/HLMZD/

Attachments (0)
Change History (10)

Changed January 20, 2013 10:00PM UTC by rwaldron comment:1

milestone: None1.9.1
owner: → rwaldron
status: newassigned

Confirmed. Patch to follow...

Changed January 20, 2013 10:25PM UTC by rwaldron comment:2

Interesting, when you change the dataType to "text" and manually use jQuery.parseXML on the response text, it works fine.

Changed January 20, 2013 10:41PM UTC by dmethvin comment:3

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.

Changed January 20, 2013 11:07PM UTC by jaubourg comment:4

We already switched to text only requests in 2.0's xhr transport so we may as well do so in 1.9.

Changed January 21, 2013 12:47AM UTC by rwaldron comment:5

Julian, do you want to take this?

Changed January 21, 2013 01:02AM UTC by jaubourg comment:6

component: unfiledajax
owner: rwaldronjaubourg
priority: undecidedhigh

Let me handle it then. What's the timeframe for 1.9.1?

Changed January 21, 2013 01:07AM UTC by dmethvin comment:7

Probably about a week?

Changed January 21, 2013 01:44AM UTC by jaubourg comment:8

resolution: → fixed
status: assignedclosed

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

Changed January 21, 2013 01:54AM UTC by jaubourg comment:9

Fixes #13276. Unit test is enough since the 2.x XHR transport already dismissed the XML as parsed by the XHR instance.

Changeset: 4c6fb65d358f6a9795f06ec8d5ed3acad6ad795d

Changed January 21, 2013 01:55AM UTC by jaubourg comment:10

I could only exhibit the bug in IE9 btw.