6

I am building a web scraper using Firefox with Selenium WebDriver, and I would like to use XPath expressions that exist only in XPath 2 and XPath 3.

Which version of XPath does Firefox support?

If it is XPath 1.0, is there any way to make Firefox support later versions?


Note: The current version of Firefox as of writing is 47.0.

P A N
  • 1,517

1 Answers1

4

Which version of XPath does Firefox support?

Firefox currently supports XPath 1.0.

There are no plans to support Xpath 2.0.

See What browsers support Xpath 2.0? for some workarounds.

Support for XPath varies widely; it's supported reasonably well in Firefox (although there are no plans to improve support further), while other browsers implement it to a lesser extent if at all.

Source XPath

There is an open (since 2007) bug report to add support for XPath 2.0:

As Xpath 2.0 and Xslt 2.0 is a w3c recommendation, it would be a good idea to implement it into the engine.

Source Bug 396966 - Xpath 2.0


Further Reading

DavidPostill
  • 162,382