Reputation: 699
The below code does not run in Chrome.
function parseXML(xmlstring) {
var dom;
if (window.ActiveXObject && window.GetObject) {
dom = new ActiveXObject('Microsoft.XMLDOM');
dom.loadXML(xmlstring);
return dom;
}
if (window.DOMParser) {
var xmlDoc = new window.XMLHttpRequest();
xmlDoc.open("GET", xmlstring, false);
xmlDoc.overrideMimeType('text/xml');
xmlDoc.onreadystatechange = function () {
if (xmlDoc.readyState == 4 && xmlDoc.status == 200) {
dom = xmlDoc.responseXML;
return dom;
}
};
xmlDoc.send("");
//return new DOMParser().parseFromString((xmlstring), 'text/xml');
} } I tried all posibility even used $.parseXML but did not work in Chrome Your valuable input will be highly appreciated.
Upvotes: 0
Views: 937
Reputation: 699
i got the dom properly but i was doing $(dom).find('') instead of $(dom.find(" ") dont know why this strange behavior in Chrome...Now it works in all browser...[:)]
Upvotes: 1