Network Deployment (Distributed operating systems), v8.0 > Develop and deploying applications > XML applications > Use the XML API to perform operations > Performing basic operations > Overview of the XML API
Supported input and result types
The API supports standard implementations of Java API for XML Processing (JAXP) input and result types.
The following standard implementations of the JAXP Source interface are supported as the input to the execute methods of an executable object (XPathExecutable, XQueryExecutable, and XSLTExecutable) as well as to other methods that take a Source object such as XItemFactory.item(Source), XDynamicContext.bind(QName, Source), and so on. They are also accepted for the stylesheet parameter to the XFactory.prepareXSLT methods. These classes are all included in the 1.6 version of the JRE. Refer to the Java API documentation for more information.
- javax.xml.transform.stream.StreamSource
- javax.xml.transform.dom.DOMSource
- javax.xml.transform.sax.SAXSource
- javax.xml.transform.stax.StAXSource
The XSourceResolver.getSource method can return any of the above implementations of source as well as a further implementation, XItemSource, provided by the API. This allows results from a previous query or transformation to be used as input to a new query or transformation without first serializing to a DOM or stream. The XItemSource can simply be initialized with the XItemView instance and returned by the XSourceResolver implementation.
The following standard implementations of the JAXP Result interface are supported for those execute methods that take a result as well as other methods that take a result object such as the export methods on XItemView and XSequenceCursor. These classes are included in the 1.6 version of the JRE. Refer to the Java API documentation for more information.
- javax.xml.transform.stream.StreamResult
- javax.xml.transform.dom.DOMResult
- javax.xml.transform.sax.SAXResult
- javax.xml.transform.stax.StAXResult
A further implementation of the Result interface, XSequenceCursorResult, is provided by the API to allow a result to be returned as an XSequenceCursor. The execute methods on the executable objects that do not take a result object return the result as an XSequenceCursor already; therefore, this is primarily for use with XSLT multiple result documents. An implementation of XResultResolver can return an XSequenceCursorResult to the processor and the processor will populate the XSequenceCursorResult with the XSequenceCursor and the associated output parameters during processing. After the transformation is complete the XSequenceCursor can be retrieved by the application by calling the getSequenceCursor method on the XSequenceCursorResult object. The output parameters can be retrieved by calling the getOutputParameters method. The output parameters then can be used on a call to the XSequenceCursor exportSequence method.
Use source and result resolvers
Use a result resolver at execution time
Navigate with XSequenceCursor