Here a simple example of XIncProc XInclude Api Usage
The expression to find node "genre" with XPointer Framework is very simple: "bk101" (see Shorthand Pointer)
Code to find "genre" node with XPointer engine is as simple as this:
InputStream sourceStream = new FileInputStream(...);
XIncProcEngine.parse(sourceStream, baseUri, outputStream);
Et voila !
For example, that source document :
<x xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="include1.xml"/>
</x>
including this document:
<foo/>
The parsed result document will be this:
<?xml version="1.0" encoding="UTF-8"?><x>
<foo xml:base="include1.xml"/>
</x>