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: |
Description
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.
Steve
Attachments (1)
Change History (4)
Changed November 13, 2008 02:52PM UTC by comment:1
cc: | → sbryant, flesler |
---|---|
need: | Test Case → Review |
owner: | → flesler |
status: | new → assigned |
Changed December 27, 2010 10:36PM UTC by comment:2
keywords: | explorer xml → explorer,xml,ajaxrewrite |
---|
Changed January 28, 2011 01:13AM UTC by comment:3
cc: | sbryant, flesler |
---|---|
keywords: | explorer,xml,ajaxrewrite → explorer,xml |
milestone: | 1.3 → 1.5 |
priority: | minor → low |
resolution: | → duplicate |
status: | assigned → closed |
version: | 1.2.6 → 1.4.4 |
This is fixed with jQuery 1.5. Ypu just need to set dataType: "xml"
Ok, seems good. I'll assign this to me so I have it at hand once I get to check this closer.