var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { showResult(xhttp.responseXML); } }; xhttp.open("GET", "tovar.xml", true); xhttp.send(); function showResult(xml) { var txt = ""; if (xml.evaluate) { path = "/result/page/properties/group[1]/property[2]/value"; var nodes = xml.evaluate(path, xml, null, XPathResult.ANY_TYPE, null); var result = nodes.iterateNext(); tpname=result.childNodes[0].nodeValue; console.log(result.childNodes[0].nodeValue); // Code For Internet Explorer } else { //} else if (window.ActiveXObject || xhttp.responseType == "msxml-document") { path = "/result/page/properties/group[1]/property[2]/value"; xml.setProperty("SelectionLanguage", "XPath"); } } 

Broke with an error: The object does not support the property or method "setProperty". What am I doing wrong?

  • And what version of IE do you use? - Artyom Okonechnikov
  • 11.0.9600.18163 - Slava32768

0