summaryrefslogtreecommitdiff
path: root/xsd-examples/cxx/tree/streaming/README
diff options
context:
space:
mode:
Diffstat (limited to 'xsd-examples/cxx/tree/streaming/README')
-rw-r--r--xsd-examples/cxx/tree/streaming/README26
1 files changed, 22 insertions, 4 deletions
diff --git a/xsd-examples/cxx/tree/streaming/README b/xsd-examples/cxx/tree/streaming/README
index 5a467e0..23d3a7f 100644
--- a/xsd-examples/cxx/tree/streaming/README
+++ b/xsd-examples/cxx/tree/streaming/README
@@ -18,8 +18,12 @@ position.xml
position.hxx
position.cxx
C++ types that represent the position vocabulary as well as parsing
- and serialization functions. These are generated by XSD from
- position.xsd.
+ and serialization functions.
+
+ These files are generated by the XSD compiler from position.xsd using
+ the following command line:
+
+ xsd cxx-tree --generate-serialization position.xsd
parser.hxx
parser.cxx
@@ -44,8 +48,22 @@ driver.cxx
It also serializes the object model fragments into a new XML document
(out.xml).
-To run the example 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 position.cxx
+c++ -DXSD_CXX11 -c parser.cxx
+c++ -DXSD_CXX11 -c serializer.cxx
+c++ -DXSD_CXX11 -c grammar-input-stream.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o position.o parser.o serializer.o \
+ grammar-input-stream.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 position.xml
+./driver position.xml
The serialization results are written to the out.xml file.