XPath API for Java

This section describes how to use Saxon as a Java class library for XPath processing, without making any use of XSLT stylesheets. It includes information on the XPath API, and the API for the Saxon implementation of the XPath object model. On other pages you will find the API for XSLT transformation, the API for running XQuery, and the API for Schema validation.

For information about the different ways of loading source documents, see Handling Source Documents.

Saxon supports three Java APIs for XPath processing, as follows:

Saxon allows XPath expressions to be evaluated either against its own native tree models of XML (the tiny tree and linked tree), and also against trees built using the DOM, JDOM, JDOM2, DOM4J, XOM, or AXIOM tree models. (It's also possible to build adapters for other tree models, though this is not for the faint-hearted.)