logoalt Hacker News

thomasmgyesterday at 5:32 AM1 replyview on HN

The point is that you don't need the very latest version. The 20 years old version is enough.


Replies

rhdunnyesterday at 6:21 AM

XPath 1.0 is a pain to write queries for. XPath 2.0 adds features that make it easier to write queries. XPath 3.1 adds support for maps, arrays, and JSON.

And the default Python XPath support is severely limited, not even a full 1.0 implementation. You can't use the Python XPath support to do things like `element[contains(@attribute, 'value')]` so you need to include an external library to implement XPath.