summaryrefslogtreecommitdiff
path: root/xsd-examples/cxx/tree/polymorphism/README
diff options
context:
space:
mode:
Diffstat (limited to 'xsd-examples/cxx/tree/polymorphism/README')
-rw-r--r--xsd-examples/cxx/tree/polymorphism/README22
1 files changed, 18 insertions, 4 deletions
diff --git a/xsd-examples/cxx/tree/polymorphism/README b/xsd-examples/cxx/tree/polymorphism/README
index 6e54e49..368ddd0 100644
--- a/xsd-examples/cxx/tree/polymorphism/README
+++ b/xsd-examples/cxx/tree/polymorphism/README
@@ -14,9 +14,16 @@ supermen.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 supermen.xsd.
+ object model back to XML.
+
+ These files are generated by the XSD compiler from supermen.xsd using
+ the following command line:
+
+ xsd cxx-tree --generate-polymorphic --generate-serialization \
+ --root-element-last supermen.xsd
+
Note also that we use the --generate-polymorphic command line option
- and that we don't need to use --polymorphic-type to explicitly mark
+ and that we don't need to use --polymorphic-type to explicitly mark
types as polymorphic because this is automatically deduced by the
XSD compiler from the substitution groups used in the supermen.xsd
schema.
@@ -27,6 +34,13 @@ driver.cxx
the content of the object model to STDERR. 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 supermen.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o supermen.o -lxerces-c
+
+To run the example on the sample XML instance document execute:
-$ ./driver instance.xml
+./driver supermen.xml