summaryrefslogtreecommitdiff
path: root/xsd-examples/cxx/tree/secure/README
diff options
context:
space:
mode:
Diffstat (limited to 'xsd-examples/cxx/tree/secure/README')
-rw-r--r--xsd-examples/cxx/tree/secure/README22
1 files changed, 19 insertions, 3 deletions
diff --git a/xsd-examples/cxx/tree/secure/README b/xsd-examples/cxx/tree/secure/README
index 649f0a3..7fa6445 100644
--- a/xsd-examples/cxx/tree/secure/README
+++ b/xsd-examples/cxx/tree/secure/README
@@ -19,7 +19,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 the XSD compiler 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
secure-dom-parser.hxx
secure-dom-parser.cxx
@@ -33,9 +38,20 @@ driver.cxx
this DOM document. Finally, 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 secure-dom-parser.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o library.o secure-dom-parser.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
+./driver library.xml
To verify that DTD processing is disabled, uncomment a different DOCTYPE
version in the sample document.