Skip to main content

Bug Tracker

Side navigation

#3598 closed bug (duplicate)

Opened November 13, 2008 08:43AM UTC

Closed January 28, 2011 01:13AM UTC

Last modified March 15, 2012 12:07AM UTC

Internet Explorer doesn't parse XML from file:/

Reported by: sbryant Owned by: flesler
Priority: low Milestone: 1.5
Component: ajax Version: 1.4.4
Keywords: explorer,xml Cc:
Blocked by: Blocking:

This ticket provides a fix for an IE bug: it won't parse an XML file without knowing that the file is XML. HTTP provides the Content-type header, but file:/ doesn't, and IE won't even fall back to the Windows file type settings (which would at least let it parse *.xml). Other browsers will attempt to parse XML from file:/ and don't have this problem.

This bug will affect anyone dry testing on the local file system with the Internet Explorer.

The fix checks whether the expected DOM tree is missing, and attempts to create it. A parse failure here leaves the HTTP request effectively in the same state as before.

The fix is 2 new lines of code in httpData(), directly before the "parsererror" test.

if ( xml && !data.documentElement && xhr.responseStream )

try { data.load( xhr.responseStream ); } catch(e){}

This patch is against jquery 1.2.6.


Attachments (1)
  • jquery.diff (0.6 KB) - added by sbryant November 13, 2008 08:44AM UTC.
Change History (4)

Changed November 13, 2008 02:52PM UTC by flesler comment:1

cc: → sbryant, flesler
need: Test CaseReview
owner: → flesler
status: newassigned

Ok, seems good. I'll assign this to me so I have it at hand once I get to check this closer.

Changed December 27, 2010 10:36PM UTC by rwaldron comment:2

keywords: explorer xmlexplorer,xml,ajaxrewrite

Changed January 28, 2011 01:13AM UTC by jitter comment:3

cc: sbryant, flesler
keywords: explorer,xml,ajaxrewriteexplorer,xml
milestone: 1.31.5
priority: minorlow
resolution: → duplicate
status: assignedclosed

This is fixed with jQuery 1.5. Ypu just need to set dataType: "xml"

Changed January 28, 2011 01:13AM UTC by jitter comment:4

Duplicate of #4807.