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

..23-Aug-2017-

READMEH A D23-Aug-20171.3 KiB4534

driver.cxxH A D23-Aug-20172.6 KiB11079

library-pimpl.cxxH A D23-Aug-20172.6 KiB184137

library-pimpl.hxxH A D23-Aug-20171.9 KiB13687

library.hxxH A D23-Aug-20172.8 KiB242156

library.mapH A D23-Aug-2017320 1613

library.xmlH A D23-Aug-20171.2 KiB5335

library.xsdH A D23-Aug-20172.1 KiB7954

makefileH A D23-Aug-20173.7 KiB11164

README

1This example shows how to use the C++/Parser mapping to construct
2a custom in-memory object model from XML instance documents.
3
4The example consists of the following files:
5
6library.xsd
7  XML Schema which describes a library of books.
8
9library.xml
10  Sample XML instance document.
11
12library.hxx
13  Types that describe a library of books in C++. These are
14  hand-written.
15
16library.map
17  Type map. It maps XML Schema types defined in library.xsd
18  to the C++ types defined in library.hxx.
19
20library-pskel.hxx
21library-pskel.ixx
22library-pskel.cxx
23  Parser skeletons generated by XSD from library.xsd and
24  library.map.
25
26library-pimpl.hxx
27library-pimpl.cxx
28  Parser implementations that construct the custom in-memory
29  object model from an XML instance using the types from
30  library.hxx. These are hand-written implementations of
31  the parser skeletons defined in library-pskel.hxx.
32
33driver.cxx
34  Driver for the example. It first constructs a parser
35  instance from all the individual parsers found in
36  library-pimpl.hxx. In then invokes this parser instance
37  to parse the input file and produce the in-memory
38  object model. Finally, it prints the contents of the
39  in-memory object model to STDERR.
40
41To run the example on the sample XML instance document simply
42execute:
43
44$ ./driver library.xml
45