S9API Examples

This section applies to the Java platform only.

Saxon's s9api interface is a custom-designed interface for all XML processing. This API is useful when you want to write your own Java applications that invoke Saxon XSLT transforms, XQuery, and evaluate XPath expressions (for more information see Using s9api for Transformations, Using s9api for XQuery, and Evaluating XPath Expressions using s9api respectively).

A sample program that illustrates many features of the s9api interface is included in the saxon-resources download as S9APIExamples.java. To run the program, use the command:

cd samples
java S9APIExamples

You can supply an argument to indicate which of the examples you want to run; see the source code for details. By default, they are all executed in turn.