Project

Profile

Help

How to connect?
Download (2.27 KB) Statistics
| Branch: | Tag: | Revision:

he / latest9.3 / hej / net / sf / saxon / pull / package.html @ eca87e2d

1
<html>
2

    
3
<head>
4
<title>Package overview for net.sf.saxon.pull</title>
5
</head>
6

    
7
<body>
8

    
9

    
10

    
11
<p>This package provides classes that interface Saxon to an XML parser that supplies data in the form
12
    of a stream of events. It provides an interface, <code>PullProvider</code>, that is an abstraction
13
over the pull parser interfaces provided on Java and .NET, and that can in principle be implemented
14
by other data sources to deliver input documents as if they came from a parser.</p>
15

    
16
<p>This package is almost obsolete. Pull-mode processing of queries, when required at all, is generally
17
done using the classes in the {@link net.sf.saxon.evpull} package, which deliver a stream of events
18
as objects, rather than as simple integers (analogous to the two styles of pull processing interface
19
in StAX).</p>
20

    
21
<p>The API, defined in class <code>PullProvider</code>, is loosely modelled on the StAX <code>XMLReader</code>
22
API. It is not identical, because it is designed as an intimate and efficient interface that integrates with
23
Saxon concepts such as the <code>SequenceIterator</code> and the <code>NamePool</code>. A class
24
<code>StaxBridge</code> is available that provides the <code>PullProvider</code> interface on top of a
25
StAX pull parser. In the .NET build, a similar class <code>DotNetPullProvider</code> interfaces Saxon to the
26
Microsoft <code>XmlTextReader</code>.</p>
27

    
28
<p>A source of data delivered by a <code>PullProvider</code> may be presented either as a <code>PullSource</code>
29
or as a <code>StaxSource</code>. Both these are accepted by any Saxon interface that allows a JAXP
30
<code>Source</code> object to be supplied.</p>
31

    
32
<p>Additional implementations of <code>PullProvider</code> are available in <code>Saxon-PE</code> and
33
<code>Saxon-EE</code>, specifically, implementations that deliver data by walking a Saxon tree structure
34
(represented by class <code>NodeInfo</code>), and implementations that allow queries to be evaluated
35
in pull mode, with lazy construction of temporary document and element nodes.</p>
36

    
37
<p>Some examples of application code using the pull interface with Saxon are provided in the
38
<code>PullExamples.java</code> file in the samples directory.</p>
39

    
40

    
41
<p align="center"><i>Michael H. Kay<br/>
42
Saxonica Limited<br/>
43
10 June 2009</i></p>
44
</body>
45
</html>
(10-10/10)