From 707cc94fe52463870a9c6c8e2e66eaaa389e601d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 24 Feb 2009 15:16:26 +0200 Subject: Start tracking XSD/e with git after version 3.0.0 --- examples/cxx/parser/minimal/README | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 examples/cxx/parser/minimal/README (limited to 'examples/cxx/parser/minimal/README') diff --git a/examples/cxx/parser/minimal/README b/examples/cxx/parser/minimal/README new file mode 100644 index 0000000..a525533 --- /dev/null +++ b/examples/cxx/parser/minimal/README @@ -0,0 +1,51 @@ +This example is a minimal parser implementation that is +intended to work without STL, iostream, or C++ exceptions. + +The example consists of the following files: + +people.xsd + XML Schema which describes a collection of person + records. + +people.xml + Sample XML instance document. + +gender.hxx + C++ gender enum that corresponds to the gender types + in people.xsd. + +people.map + Type map. It maps XML Schema gender type defined in + people.xsd to C++ gender enum defined in gender.hxx. + +people-pskel.hxx +people-pskel.ixx +people-pskel.cxx + Parser skeletons generated by XSD/e from people.xsd and + people.map. The --no-stl and --no-exceptions options + were used to produce these files. + +people-pimpl-mixin.hxx + +people-pimpl-tiein.hxx + Parser implementations (using either mixin or tiein parser + reuse style) that prints the results to STDERR. These are + hand-written implementations of the parser skeletons defined + in people-pskel.hxx. + +driver.cxx + Driver for the example. It first constructs a parser instance + from the parser implementation mentioned above and a couple of + predefined parsers for the XML Schema built-in types. In then + invokes this parser instance to parse the input file. It also + shows how to handle parsing and validation errors using error + codes. + +To run the example on the sample XML instance document simply +execute: + +$ ./driver people.xml + +The example reads from STDIN if input file is not specified: + +$ ./driver