This library implements a complete XPath 2 Parser in Java 11, using Parboiled.
The parser generates an AST (Abstract Syntax Tree) which you can then use in your own application for whatever you wish. The class XPathUtil shows how the parser can be used. You can also execute XPathUtil
as an application if you want to understand the node-tree produced by the parser.
The compiled artifact can be obtained from Maven Central by adding the following to the <dependencies>
section of your pom.xml
:
<dependency>
<groupId>com.evolvedbinary.xpath</groupId>
<artifactId>xpath2-parser</artifactId>
<version>1.0</version>
</dependency>
If you are a Scala, Groovy or Clojure person then you can still use the artifact from Maven Central with your favourite build tool, however I will assume you know what your doing ;-)
- Provide some tutorials or better documentation
- Update this to XPath 3.1...