diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-09-26 10:43:31 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-09-27 15:13:24 +0300 |
commit | 741bfb659caaa771c748d03df26792fab10e5778 (patch) | |
tree | db562df317a95507f8d66fdd63916cf198b95ec2 /xsd-examples/cxx/tree/custom/wildcard | |
parent | 38d7c2a86cce70436ad359a62c603d64710e8471 (diff) |
Add XSD and C++ compiler command lines to example READMEs
Diffstat (limited to 'xsd-examples/cxx/tree/custom/wildcard')
-rw-r--r-- | xsd-examples/cxx/tree/custom/wildcard/README | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/xsd-examples/cxx/tree/custom/wildcard/README b/xsd-examples/cxx/tree/custom/wildcard/README index 70eaea4..8b5b2f0 100644 --- a/xsd-examples/cxx/tree/custom/wildcard/README +++ b/xsd-examples/cxx/tree/custom/wildcard/README @@ -23,8 +23,16 @@ wildcard.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 wildcard.xsd - with the --custom-type option in order to customize the data type. + object model back to XML. + + These files are generated by the XSD compiler from wildcard.xsd using + the following command line: + + xsd cxx-tree --generate-serialization --generate-ostream \ + --custom-type data=/data_base \ + --hxx-epilogue '#include "wildcard-custom.hxx"' wildcard.xsd + + The --custom-type option is used to customize the data type. wildcard-custom.hxx Header file which defines our own data class by inheriting from the @@ -40,6 +48,14 @@ driver.cxx the data to STDERR, including the extra attribute. Finally, the driver serializes the object model back 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++ -c wildcard.cxx +c++ -c wildcard-custom.cxx +c++ -c driver.cxx +c++ -o driver driver.o wildcard.o wildcard-custom.o -lxerces-c + +To run the example on the sample XML instance document execute: -$ ./driver wildcard.xml +./driver wildcard.xml |