From 741bfb659caaa771c748d03df26792fab10e5778 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 26 Sep 2023 10:43:31 +0200 Subject: Add XSD and C++ compiler command lines to example READMEs --- xsd-examples/cxx/tree/mixed/README | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'xsd-examples/cxx/tree/mixed') diff --git a/xsd-examples/cxx/tree/mixed/README b/xsd-examples/cxx/tree/mixed/README index fc23faa..49ec809 100644 --- a/xsd-examples/cxx/tree/mixed/README +++ b/xsd-examples/cxx/tree/mixed/README @@ -32,7 +32,12 @@ text.hxx text.cxx C++ types that represent the given vocabulary and a set of parsing functions that convert XML instance documents to a tree-like in-memory - object model. These are generated by XSD from text.xsd. + object model. + + These files are generated by the XSD compiler from text.xsd using the + following command line: + + xsd cxx-tree text.xsd driver.cxx Driver for the example. It first calls one of the parsing functions @@ -40,6 +45,16 @@ driver.cxx both the underlying DOM and statically-typed mapping to perform the transformation. -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 text.cxx +c++ -DXSD_CXX11 -c driver.cxx +c++ -o driver driver.o text.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 text.xml +./driver text.xml -- cgit v1.1