diff options
Diffstat (limited to 'xsd-examples/cxx/tree/wildcard')
-rw-r--r-- | xsd-examples/cxx/tree/wildcard/README | 23 | ||||
-rw-r--r-- | xsd-examples/cxx/tree/wildcard/buildfile | 4 |
2 files changed, 21 insertions, 6 deletions
diff --git a/xsd-examples/cxx/tree/wildcard/README b/xsd-examples/cxx/tree/wildcard/README index d451509..8b89774 100644 --- a/xsd-examples/cxx/tree/wildcard/README +++ b/xsd-examples/cxx/tree/wildcard/README @@ -19,7 +19,14 @@ email.cxx C++ types that represent the given vocabulary, a set of parsing functions that convert XML instance documents to a tree-like in-memory object model, and a set of serialization functions that convert the - object model back to XML. These are generated by XSD from email.xsd. + object model back to XML. + + These files are generated by the XSD compiler from email.xsd using the + following command line: + + xsd cxx-tree --generate-wildcard --generate-serialization \ + --root-element message email.xsd + Note that the --generate-wildcard option is used to request the wildcard mapping. @@ -29,6 +36,16 @@ driver.cxx the content of the object model to STDERR. Next the driver creates a reply email which is then serialized to XML. -To run the example on the sample XML instance document simply execute: +To compile and link the example manually from the command line we can use +the following commands (replace 'c++' with your C++ compiler name): + +c++ -DXSD_CXX11 -c email.cxx +c++ -DXSD_CXX11 -c driver.cxx +c++ -o driver driver.o email.o -lxerces-c + +Note that we need to define the XSD_CXX11 preprocessor macro since the +source code includes libxsd headers directly. + +To run the example on the sample XML instance document execute: -$ ./driver email.xml +./driver email.xml diff --git a/xsd-examples/cxx/tree/wildcard/buildfile b/xsd-examples/cxx/tree/wildcard/buildfile index 5bc63c5..dc158f4 100644 --- a/xsd-examples/cxx/tree/wildcard/buildfile +++ b/xsd-examples/cxx/tree/wildcard/buildfile @@ -12,9 +12,7 @@ exe{driver}: xml{email}: test.input = true <{hxx ixx cxx}{email}>: xsd{email} $xsd {{ - diag xsd ($<[0]) # @@ TMP - - $xsd cxx-tree --std c++11 \ + $xsd cxx-tree \ --generate-inline \ --generate-wildcard \ --generate-serialization \ |