IE has a slightly different implementation of XML documents from other browsers, one of the differences being that in IE there is an xml
property of the document.
If you want to serialize the XML into a string in all browsers, you can use the following:
function serializeXmlDoc(xmlDoc) {
if (window.XMLSerializer) {
return (new window.XMLSerializer()).serializeToString(xmlDoc);
} else if (typeof xmlDoc.xml != "undefined") {
return xmlDoc.xml;
}
}
Tim Down
2010-07-08 12:39:10