• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..23-Aug-2017-

READMEH A D23-Aug-20171.8 KiB5240

driver.cxxH A D23-Aug-20173.5 KiB14079

grammar-input-stream.cxxH A D23-Aug-20171.9 KiB9763

grammar-input-stream.hxxH A D23-Aug-20171 KiB4224

makefileH A D23-Aug-20174.1 KiB11669

parser.cxxH A D23-Aug-20178.7 KiB373246

parser.hxxH A D23-Aug-20171.9 KiB6830

position.xmlH A D23-Aug-2017769 3018

position.xsdH A D23-Aug-20171 KiB3823

serializer.cxxH A D23-Aug-201716.1 KiB637467

serializer.hxxH A D23-Aug-20174.9 KiB206149

README

1This example shows how to perform stream-oriented, partially in-memory
2XML processing using the C++/Tree mapping. With the partially in-memory
3parsing and serialization only a part of the object model is in memory at
4any given time. With this approach we can process parts of the document
5as they become available as well as handle documents that are too large
6to fit into memory.
7
8The example consists of the following files:
9
10position.xsd
11  XML Schema which describes a simple object position vocabulary. The
12  position is represented as a potentially large series of latitude and
13  longitude measurements.
14
15position.xml
16  Sample object position document.
17
18position.hxx
19position.cxx
20  C++ types that represent the position vocabulary as well as parsing
21  and serialization functions. These are generated by XSD from
22  position.xsd.
23
24parser.hxx
25parser.cxx
26  Stream-oriented DOM parser implementation that is built on top of the
27  Xerces-C++ SAX2 parser in the progressive parsing mode. This parser
28  allows us to parse an XML document as a series of DOM fragments.
29
30serializer.hxx
31serializer.cxx
32  Stream-oriented DOM serializer implementation that allows us to
33  serialize an XML Document as a series of object model fragments.
34
35grammar-input-stream.hxx
36grammar-input-stream.cxx
37  Input stream implementation with the special-purpose schema grammar
38  decompression algorithm. It is used internally by the streaming parser.
39
40driver.cxx
41  Driver for the example. It parses the input file into a series of DOM
42  fragments which are then parsed into the object model fragments. The
43  driver prints the information from the document as it becomes available.
44  It also serializes the object model fragments into a new XML document
45  (out.xml).
46
47To run the example simply execute:
48
49$ ./driver position.xml
50
51The serialization results are written to the out.xml file.
52