parseXML: function(data, xml, tmp) {
if (window.DOMParser) { //标准 IE9可以
tmp = new DOMParser();
xml = tmp.parseFromString(data, "text/xml");
} else { // IE
xml = new ActiveXObject("Microsoft.XMLDOM");
xml.async = "false";
xml.loadXML(data);
}
tmp = xml.documentElement;
if (!tmp || !tmp.nodeName || tmp.nodeName === "parsererror") {
jQuery.error("Invalid XML: " + data);
}
return xml;
}
//link https://sites.google.com/a/van-steenbeek.net/archive/explorer_domparser_parsefromstring
jQuery.parseXML()
最新推荐文章于 2020-12-09 11:17:46 发布