Skip navigation links

Package net.sf.saxon.pull

This package provides classes that interface Saxon to an XML parser that supplies data in the form of a stream of events.

See: Description

Package net.sf.saxon.pull Description

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 XMLReader 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 Microsoft XmlTextReader.

A source of data delivered by a PullProvider may be presented either as a PullSource 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-PE and 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.

Michael H. Kay
Saxonica Limited
10 June 2009

Skip navigation links

Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.