Xpath support in my browser?

How can I find which version of xpath is supported in my browser?

Currently versions 1 and 2. 2 are moving forward.

+7
source share
3 answers

You can check the user agent and versions (minor / major) and compare with this supported list inside your client JavaScript code.

eg. You can implement this list from Wikipedia .

+1
source

I think that the built-in XPath implementations in modern desktop browsers like IE, Mozilla, Opera, Safari, and Chrome are all versions of XPath 1.0. If you want to use the XPath 2.0 client console, it is best to look at attempts to implement XQuery 1.0 (of which XPath 2.0 is a subset) in a browser, for example http://www.xqib.org/ .

+1
source

Five major browsers currently implement XPath 1.0 .

If you need XPath 2.0 support, you can either use Saxon CE (Saxon cross-compiled for Javascript, which works in all major browsers). or XQIB (XQuery in the browser).

+1
source

All Articles