https://github.com/exquery/xpath2-parser
A libre parser for XPath 2.0 in Java
https://github.com/exquery/xpath2-parser
Last synced: 5 months ago
JSON representation
A libre parser for XPath 2.0 in Java
- Host: GitHub
- URL: https://github.com/exquery/xpath2-parser
- Owner: exquery
- License: gpl-2.0
- Created: 2016-01-30T17:23:31.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2024-03-12T02:50:21.000Z (over 2 years ago)
- Last Synced: 2025-07-26T12:08:22.920Z (11 months ago)
- Language: Java
- Homepage:
- Size: 207 KB
- Stars: 14
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
XPath Parser
============
[](https://github.com/exquery/xpath2-parser/actions/workflows/ci.yml)
[](http://java.oracle.com)
[](https://www.gnu.org/licenses/gpl-2.0.html)
This library implements a complete XPath 2 Parser in Java 11, using [Parboiled](https://github.com/sirthias/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](https://github.com/exquery/xpath2-parser/blob/master/src/main/java/com/evolvedbinary/xpath/parser/XPathUtil.java) 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.
Obtaining
---------
The [compiled artifact](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.evolvedbinary.xpath%22%20AND%20a%3A%22xpath2-parser%22) can be obtained from Maven Central by adding the following to the `` section of your `pom.xml`:
```xml
com.evolvedbinary.xpath
xpath2-parser
1.0
```
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 ;-)
Future Work
-----------
* Provide some tutorials or better documentation
* Update this to XPath 3.1...