Xpath support in my browser?

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

There are currently ver 1 and 2. 2 is way advanced.


You could check the user agent and versions (minor/major) and compare with a given supported list inside your client-side JavaScript code.

Eg you could implement this list from Wikipedia.


I think the built-in XPath implementations in current desktop browsers like IE, Mozilla, Opera, Safari and Chrome are all XPath 1.0 implementations. If you want XPath 2.0 client-side then your best bet is to look at attempts to implement XQuery 1.0 (of which XPath 2.0 is a subset) in the browser, like http://www.xqib.org/.


At present the five major browsers only implement XPath 1.0 .

If you want XPath 2.0 support you can either use Saxon CE (Saxon cross-compiled to Javascript that is working in all major browsers). or XQIB (XQuery in the browser).

链接地址: http://www.djcxy.com/p/9782.html

上一篇: 模板参数演绎在MSVC上失败:bug?

下一篇: Xpath支持在我的浏览器中?