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

..23-Aug-2017-

READMEH A D23-Aug-20171.1 KiB3728

batman.xmlH A D23-Aug-2017340 176

driver.cxxH A D23-Aug-20173.2 KiB13991

makefileH A D23-Aug-20173.7 KiB11164

person.xmlH A D23-Aug-2017286 165

superman.xmlH A D23-Aug-2017338 176

supermen-pimpl.cxxH A D23-Aug-20171.2 KiB8662

supermen-pimpl.hxxH A D23-Aug-20171.2 KiB6540

supermen.xsdH A D23-Aug-2017888 3723

README

1This example shows how to handle the xsi:type attributes when it is used
2on root elements. For general coverage of XML Schema polymorphism handling
3in the C++/Parser mapping see the polymorphism example.
4
5The example consists of the following files:
6
7supermen.xsd
8  XML Schema which describes the "supermen" instance documents.
9
10person.xml
11superman.xml
12batman.xml
13  Sample XML instance documents.
14
15supermen-pskel.hxx
16supermen-pskel.cxx
17  Parser skeletons generated by the XSD compiler from supermen.xsd.
18  Note the use of the --generate-polymorphic command line option.
19
20supermen-pimpl.hxx
21supermen-pimpl.cxx
22  Parser implementations that print the XML data to STDOUT.
23
24driver.cxx
25  Driver for the example. It implements a custom document parser
26  that determines which XML Schema type is being parsed and uses
27  the corresponding parser implementation. The driver first
28  constructs a parser instance from all the individual parsers
29  found in supermen-pimpl.hxx. In then invokes this parser instance
30  to parse the input file.
31
32To run the example on the sample XML instance documents simply execute:
33
34$ ./driver person.xml
35$ ./driver superman.xml
36$ ./driver batman.xml
37