outerHTML property not working in IE 10



I have a xml file, from that I need to read the specific node as string to append to stringBuilder. So if I read directly node it will not come as a string. So I am reading as outerHTML and it is working fine in Google Chrome and it is not in IE 10. Below is the sample code



var secEssXMLDoc = '';
if (window.ActiveXObject) {
secEssXMLDoc = new ActiveXObject('Microsoft.XMLDOM');
secEssXMLDoc.loadXML(secEssXML);
}
else if (window.XMLHttpRequest) {
secEssXMLDoc = new DOMParser().parseFromString(secEssXML, 'text/xml');
}
xmlString.push("<SecondaryEssences>");
for (var j = 0; j < secEssXMLDoc.getElementsByTagName('Emguid').length; j++) {
if (document.getElementById('publishType').value == 'PLAYLIST') {
xmlString.push(secEssXMLDoc.getElementsByTagName('Emguid')[j].outerHTML);
}
else {
if (secEssXMLDoc.getElementsByTagName('Emguid') [j].getAttribute("Essence").toUpperCase().contains('BROWSE')) {
if (document.getElementById('lowResDownload').checked == false) {
secEssXMLDoc.getElementsByTagName('Emguid')[j].setAttribute("Selected", "true");
}
xmlString.push(secEssXMLDoc.getElementsByTagName('Emguid')[j].outerHTML);
}
}
}


I tried outerText, outerXML none of these working. Please help me to fix this issue. Thanks in advance.


No comments:

Post a Comment