<?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet href="../make-menu.xsl" type="text/xsl"?><html> <head> <this-is section="using-xquery" page="api-query" subpage=""/> <!-- Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: Running Queries from a Java Application</title> <meta name="coverage" content="Worldwide"/> <meta name="copyright" content="Copyright Saxonica Ltd"/> <meta name="title" content="Saxonica: XSLT and XQuery Processing: Running Queries from a Java Application"/> <meta name="robots" content="noindex,nofollow"/> <link rel="stylesheet" href="../saxondocs.css" type="text/css"/> </head> <body class="main"> <h1>Running Queries from a Java Application</h1> <p>Saxon offers three different APIs allowing queries to be run from Java:</p> <ul> <li content="para"> <p>The XQJ interface is an implementation of the XQuery API for Java (XQJ) interface defined in JSR-225</p> </li> <li content="para"> <p>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</p> </li> <li content="para"> <p>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 <a class="bodylink" href="../javadoc/net/sf/saxon/query/StaticQueryContext.html"><code>StaticQueryContext</code></a>.</p> </li> </ul> <p class="subhead">Links</p> <ul> <li> <p><a class="bodylink" href="api-query/s9api-query.xml">Using s9api for XQuery</a></p> </li> <li> <p><a class="bodylink" href="api-query/xqj.xml">Invoking XQuery using the XQJ API</a></p> </li> </ul> <table width="100%"> <tr> <td> <p align="right"><a class="nav" href="api-query/s9api-query.xml">Next</a></p> </td> </tr> </table> </body> </html>