summaryrefslogtreecommitdiff
path: root/xsd-examples/cxx/tree/caching/README
diff options
context:
space:
mode:
Diffstat (limited to 'xsd-examples/cxx/tree/caching/README')
-rw-r--r--xsd-examples/cxx/tree/caching/README21
1 files changed, 18 insertions, 3 deletions
diff --git a/xsd-examples/cxx/tree/caching/README b/xsd-examples/cxx/tree/caching/README
index 64dffb3..1672d6f 100644
--- a/xsd-examples/cxx/tree/caching/README
+++ b/xsd-examples/cxx/tree/caching/README
@@ -14,7 +14,12 @@ library.hxx
library.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 library.xsd.
+ object model.
+
+ These files are generated by the XSD compiler from library.xsd using
+ the following command line:
+
+ xsd cxx-tree library.xsd
driver.cxx
Driver for the example. It first sets up the Xerces-C++ DOM parser
@@ -24,6 +29,16 @@ driver.cxx
the object model from this DOM document. On each iteration the driver
prints a number of books in the object model to STDERR.
-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 library.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o library.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 library.xml library.xsd
+./driver library.xml library.xsd