diff options
Diffstat (limited to 'xsd-examples/cxx/tree/secure')
-rw-r--r-- | xsd-examples/cxx/tree/secure/README | 22 | ||||
-rw-r--r-- | xsd-examples/cxx/tree/secure/buildfile | 4 |
2 files changed, 20 insertions, 6 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. diff --git a/xsd-examples/cxx/tree/secure/buildfile b/xsd-examples/cxx/tree/secure/buildfile index b1ca71f..a86af57 100644 --- a/xsd-examples/cxx/tree/secure/buildfile +++ b/xsd-examples/cxx/tree/secure/buildfile @@ -12,9 +12,7 @@ exe{driver}: xml{library}: test.input = true <{hxx ixx cxx}{library}>: xsd{library} $xsd {{ - diag xsd ($<[0]) # @@ TMP - - $xsd cxx-tree --std c++11 \ + $xsd cxx-tree \ --generate-inline \ --output-dir $out_base \ $path($<[0]) |