Jaxen is an open source XPath library written in Java. It is adaptable to many different object models, including DOM, XOM, dom4j, and JDOM. Is it also possible to write adapters that treat non-XML trees such as compiled Java byte code or Java beans as XML, thus enabling you to query these trees with XPath too.

The current version is 1.2.0. This release requires Java 1.4 or later. If you're still using Java 1.3 or earlier, try Jaxen 1.1.6.

Jaxen's Maven group ID is jaxen and its artifact ID is jaxen. To add a dependency on jaxen using Maven, add this dependency element to your pom.xml:
To add a dependency using Gradle:
dependencies {
  compile 'jaxen:jaxen:1.2.0'

You can also download the binaries directly from this site:

Getting Started

You browse the FAQ or the online JavaDoc.


XOM 1.2.9 bundles Jaxen 1.2.0.

Sun chose Jaxen for the XPath engine for the JSP Standard Tag Library (JSTL) and the Java Web Services Developer Pack 1.0 and 1.1.

Since the reference implementation of Java API for XML Messaging is based on dom4j and Jaxen, you can use Jaxen to query SOAP messages on the Java platform too!

Check out Elliotte Rusty Harold's book chapter on XPath and Jaxen

Alex Chaffee wrote XPath Explorer to help visualize results of XPath expressions.