aboutsummaryrefslogtreecommitdiff
path: root/examples/cxx/parser/library/README
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cxx/parser/library/README')
-rw-r--r--examples/cxx/parser/library/README53
1 files changed, 53 insertions, 0 deletions
diff --git a/examples/cxx/parser/library/README b/examples/cxx/parser/library/README
new file mode 100644
index 0000000..da0a49b
--- /dev/null
+++ b/examples/cxx/parser/library/README
@@ -0,0 +1,53 @@
+This example shows how to use the Embedded C++/Parser mapping
+to construct a custom in-memory object model from XML instance
+documents.
+
+The example consists 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.map
+ Type map. It maps XML Schema types defined in library.xsd
+ to C++ types defined in library.hxx.
+
+library-pskel.hxx
+library-pskel.ixx
+library-pskel.cxx
+ Parser skeletons generated by XSD/e from library.xsd and
+ library.map.
+
+library-pimpl-mixin.hxx
+library-pimpl-mixin.cxx
+
+library-pimpl-tiein.hxx
+library-pimpl-tiein.cxx
+ Parser implementations (using either mixin or tiein parser
+ reuse style) that construct the custom in-memory object model
+ from an XML instance using types from library.hxx. These are
+ hand-written implementations of the parser skeletons defined
+ in library-pskel.hxx.
+
+driver.cxx
+ Driver for the example. It first constructs a parser
+ instance from all the individual parsers found in one of
+ library-pimpl-*.hxx. In then invokes this parser instance
+ to parse the input file and produce the in-memory object
+ model. Finally, it prints the content of the object model
+ to STDERR.
+
+To run the example on the sample XML instance document simply
+execute:
+
+$ ./driver library.xml
+
+The example reads from STDIN if input file is not specified:
+
+$ ./driver <library.xml