Running Queries from a Java Application
Saxon offers three different APIs allowing queries to be run from Java:
-
The XQJ interface is an implementation of the XQuery API for Java (XQJ) interface defined in JSR-225. For information on using this API to invoke the Saxon processor, see Invoking XQuery using the XQJ API.
-
The s9api interface is a Saxon-specific interface allowing integrated access to all Saxon's XML processing capabilities in a uniform way, taking advantage of the type safety offered by generics in Java 5. For information on using this API to invoke the Saxon processor, see Using s9api for XQuery.
-
There is also a legacy interface retained from previous Saxon releases, which may be appropriate if you need access to lower-level Saxon internals. This is described only in the JavaDoc: start at StaticQueryContext.