WAS v8.5 > Develop 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 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 Java 6.0 and Java 7.0 versions of the JRE. Refer to the Java API documentation for more information.

The XSourceResolver.getSource method can return any of the previous 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 Java 6.0 and Java 7.0 versions of the JRE. Refer to the Java API documentation for more information.

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.


Related


Use source and result resolvers
Use a result resolver at execution time
Navigating with XSequenceCursor


+

Search Tips   |   Advanced Search