Project

Profile

Help

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

he / latest10 / hej / net / sf / saxon / pull / package.html @ affa36fd

1
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
2
<!-- Copyright (c) 2014 Saxonica Limited. -->
3
<!-- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -->
4
<!-- If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5
<!-- This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. -->
6
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
7

    
8
<html>
9

    
10
<head>
11
    <title>Package overview for net.sf.saxon.pull</title>
12
</head>
13

    
14
<body>
15

    
16

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

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

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

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

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

    
41

    
42
</body>
43
</html>
(11-11/11)