Bug Tracker

Opened 14 years ago

Closed 13 years ago

#4975 closed bug (duplicate)

XML error in IE

Reported by: wolkesau Owned by:
Priority: major Milestone: 1.3.2
Component: ajax Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:


I use this way try to get "xml document" $.get("test.xml","",dealXML(),"xml");

It works in FF, but can not use in IE,I still get "string" data type in IE, than I google it ,found that the header Content must be "text\xml",but I use JQuery in a CD, so it`s impossible to change the header , but finally I found a way to solve this problem.

function parseXML( xml ) {

if( window.ActiveXObject && window.GetObject) {

var dom = new ActiveXObject( 'Microsoft.XMLDOM' ); dom.loadXML( xml ); return dom;

} if( window.DOMParser )

return new DOMParser().parseFromString( xml, 'text/xml' );

throw new Error( 'No XML parser available' );


I use this function to change the data to be XML document, and it work , hope it can help JQuery to be more powerful in the future.

Change History (1)

comment:1 Changed 13 years ago by dmethvin

Resolution: duplicate
Status: newclosed

Duplicate of #4958.

Note: See TracTickets for help on using tickets.