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

..23-Aug-2017-

READMEH A D23-Aug-20171.2 KiB3325

driver.cxxH A D23-Aug-20171.1 KiB6042

makefileH A D23-Aug-20173 KiB10557

supermen.xmlH A D23-Aug-2017505 2613

supermen.xsdH A D23-Aug-20171.2 KiB4930

README

1This example shows how to use XML Schema polymorphism features such as
2xsi:type attributes and substitution groups in the C++/Tree mapping.
3
4The example consists of the following files:
5
6supermen.xsd
7  XML Schema which describes the "supermen" instance documents.
8
9supermen.xml
10  Sample XML instance document.
11
12supermen.hxx
13supermen.cxx
14  C++ types that represent the given vocabulary, a set of parsing
15  functions that convert XML instance documents to a tree-like in-memory
16  object model, and a set of serialization functions that convert the
17  object model back to XML. These are generated by XSD from supermen.xsd.
18  Note also that we use the --generate-polymorphic command line option
19  and that we don't need to use --polymorphic-type to explicitly mark
20  types as polymorphic because this is automatically deduced by the
21  XSD compiler from the substitution groups used in the supermen.xsd
22  schema.
23
24driver.cxx
25  Driver for the example. It first calls one of the parsing functions
26  that constructs the object model from the input file. It then prints
27  the content of the object model to STDERR. Finally, the driver serializes
28  the object model back to XML.
29
30To run the example on the sample XML instance document simply execute:
31
32$ ./driver instance.xml
33