Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xpathresult is undefined in IE11

I am using some javascripts. I used

var xpathResults = document.evaluate(xpath, domContext, null, XPathResult.ANY_TYPE, null);

it is working fine in all the browser except IE11. It is showing error: 'XPathResult is undefined'. And yes I used wgxpath.install.js script before that.

Thanks in advance

like image 529
Sadia H Avatar asked May 09 '14 08:05

Sadia H


1 Answers

Internet Explorer does not support XPATH.

I'd suggest using CSS selectors instead of XPath if you want it to work with IE11.

If you are dead-set on using XPath, I'd suggest using an XPath javascript library (like http://code.google.com/p/wicked-good-xpath/)

Sorry for the trouble. Support for XPath in IE is currently in development.

If you are curious what we have planned for IE-Next, visit http://status.modern.ie/

like image 133
Eric Tedj - MSFT Avatar answered Nov 12 '22 12:11

Eric Tedj - MSFT