This package provides classes that interface Saxon to an XML parser that supplies data in the form
of a stream of events. It provides an interface,
PullProvider, that is an abstraction
over the pull parser interfaces provided on Java and .NET, and that can in principle be implemented
by other data sources to deliver input documents as if they came from a parser.
The API, defined in class
PullProvider, is loosely modelled on the StAX
API. It is not identical, because it is designed as an intimate and efficient interface that integrates with
Saxon concepts such as the
SequenceIterator and the
NamePool. A class
StaxBridge is available that provides the
PullProvider interface on top of a
StAX pull parser. In the .NET build, a similar class
DotNetPullProvider interfaces Saxon to the
A source of data delivered by a
PullProvider may be presented either as a
or as a
StaxSource. Both these are accepted by any Saxon interface that allows a JAXP
Source object to be supplied.
Additional implementations of
PullProvider are available in
Saxon-EE, specifically, implementations that deliver data by walking a Saxon tree structure
(represented by class
NodeInfo), and implementations that allow queries to be evaluated
in pull mode, with lazy construction of temporary document and element nodes.
Some examples of application code using the pull interface with Saxon are provided in the
PullExamples.java file in the samples directory.
Interface Summary Interface Description PullProviderPullProvider is Saxon's pull-based interface for reading XML documents and XDM sequences. UnfailingPullProviderPullProvider is Saxon's pull-based interface for reading XML documents and XDM sequences.
Class Summary Class Description NamespaceContextImplThis class bridges between the JAXP 1.3 NamespaceContext interface and Saxon's equivalent NamespaceResolver interface. PullConsumerA PullConsumer consumes all the events supplied by a PullProvider, doing nothing with them. PullFilterPullFilter is a pass-through filter class that links one PullProvider to another PullProvider in a pipeline. PullPushCopierThis class copies a document by using the pull interface to read the input document, and the push interface to write the output document. PullPushTeePullPushTee is a pass-through filter class that links one PullProvider to another PullProvider in a pipeline, copying all events that are read into a push pipeline, supplied in the form of a Receiver. PullSourceA PullSource is a JAXP Source that encapsulates a PullProvider - that is, an object that supplies an XML document as a sequence of events that are read under the control of the recipient. StaxBridgeThis class implements the Saxon PullProvider API on top of a standard StAX parser (or any other StAX XMLStreamReader implementation) UnparsedEntityThis class is used to represent unparsed entities in the PullProvider interface
Enum Summary Enum Description PullProvider.Event