I learn JS two days, so i dont have many knowledge to resolve my problems and need help. I need to get element by xPath like a
docHTML.evaluate(elementName, docHTML.body, null, XPathResult.ANY_TYPE, null).singleNodeValue
But problem is that i need use only IE 11. I know, that IE does not supported xPath, but i could find other way, using ActionXObject.
This idea i was find on How do you run an xPath query in IE11? but i cant run this code.
I try
var doc = new ActiveXObject('Microsoft.XMLDOM');
doc.loadXML(window.XMLDocument);
var node = doc.selectSingleNode('//div');
alert(node);
but didn't succeed.
Maybe I’m not getting the XML document correctly or there’s no problem?