This example shows how to use C++/Parser mapping to construct custom
in-memory representations of XML instance documents described by XML
Schema definitions.


The example consist of the following files:


library.xsd
  XML Schema which describes a library of books.


library.xml
  Sample XML instance document.


library.hxx
  Types that describe a library of books in C++. These are hand-written.


library-parser-templates.hxx
library-parser-templates.txx
  Parser templates generated by xsd from library.xsd.


library-parser.hxx
  Parser implementations that construct custom in-memory representations
  (from library.hxx) from XML instance documents. These are hand-written
  implementations of the interfaces provided by library-parser-templates.hxx.

driver.cxx
  Driver for the example. It first constructs a parser instance from
  all the individual parsers found in library-parser.hxx. In then invokes
  this parser instance to parse the input file and produce the in-memory
  representation. Finally, it prints the content of the in-memory
  representation to STDERR.


To run the example on the sample XML instance document simply execute

$ ./driver library.xml


This example also shows how to perform custom XML Schema to C++ namespace
mapping using the --namespace-regex option.
