From afebd79d44b75aed3b38e867c65330ba80ddc0ee Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 13 Oct 2009 11:29:26 +0200 Subject: Extended the streaming example It now shows how to perform stream-oriented, partially in-memory XML processing using the C++/Tree mapping. --- dist/examples/cxx/tree/streaming/makefile | 18 +++++----- .../cxx/tree/streaming/streaming-7.1.vcproj | 30 +++++++++++----- .../cxx/tree/streaming/streaming-8.0.vcproj | 42 ++++++++++++++-------- .../cxx/tree/streaming/streaming-9.0.vcproj | 42 ++++++++++++++-------- .../tree/streaming/streaming-xerces2-7.1.vcproj | 30 +++++++++++----- .../tree/streaming/streaming-xerces2-8.0.vcproj | 42 ++++++++++++++-------- .../tree/streaming/streaming-xerces2-9.0.vcproj | 42 ++++++++++++++-------- 7 files changed, 160 insertions(+), 86 deletions(-) (limited to 'dist') diff --git a/dist/examples/cxx/tree/streaming/makefile b/dist/examples/cxx/tree/streaming/makefile index 40d2dd6..ed32b83 100644 --- a/dist/examples/cxx/tree/streaming/makefile +++ b/dist/examples/cxx/tree/streaming/makefile @@ -4,28 +4,30 @@ include $(root)/build/cxx/rules.make include $(root)/build/xsd/tree-rules.make -override XSDFLAGS += --generate-serialization --suppress-parsing --root-element-all +override XSDFLAGS += --generate-serialization # Build. # -driver: driver.o records.o +driver: driver.o parser.o serializer.o position.o -records.o: records.cxx records.hxx -driver.o: driver.cxx records.hxx +position.o: position.cxx position.hxx +driver.o: driver.cxx position.hxx parser.hxx serializer.hxx +parser.o: parser.cxx parser.hxx +serializer.o: serializer.cxx serializer.hxx -records.cxx records.hxx: records.xsd +position.cxx position.hxx: position.xsd # Test # .PHONY: test -test: driver - ./driver +test: driver position.xml + ./driver position.xml # Clean. # .PHONY: clean clean: - rm -f records.o records.?xx driver.o driver out.xml + rm -f position.o position.?xx parser.o serializer.o driver.o driver out.xml diff --git a/dist/examples/cxx/tree/streaming/streaming-7.1.vcproj b/dist/examples/cxx/tree/streaming/streaming-7.1.vcproj index aeaf847..7a11fe9 100644 --- a/dist/examples/cxx/tree/streaming/streaming-7.1.vcproj +++ b/dist/examples/cxx/tree/streaming/streaming-7.1.vcproj @@ -121,7 +121,13 @@ RelativePath=".\driver.cxx"> + RelativePath=".\position.cxx"> + + + + + RelativePath=".\position.hxx"> + + + + + RelativePath=".\position.xsd"> + Description="xsd position.xsd" + CommandLine="xsd.exe cxx-tree --generate-serialization --generate-intellisense position.xsd" + Outputs="position.cxx;position.hxx"/> + Description="xsd position.xsd" + CommandLine="xsd.exe cxx-tree --generate-serialization --generate-intellisense position.xsd" + Outputs="position.cxx;position.hxx"/> diff --git a/dist/examples/cxx/tree/streaming/streaming-8.0.vcproj b/dist/examples/cxx/tree/streaming/streaming-8.0.vcproj index 05e19b9..b7f65d0 100644 --- a/dist/examples/cxx/tree/streaming/streaming-8.0.vcproj +++ b/dist/examples/cxx/tree/streaming/streaming-8.0.vcproj @@ -350,9 +350,15 @@ > + + + + + + + + diff --git a/dist/examples/cxx/tree/streaming/streaming-9.0.vcproj b/dist/examples/cxx/tree/streaming/streaming-9.0.vcproj index c5560dc..cbfec59 100644 --- a/dist/examples/cxx/tree/streaming/streaming-9.0.vcproj +++ b/dist/examples/cxx/tree/streaming/streaming-9.0.vcproj @@ -347,9 +347,15 @@ > + + + + + + + + diff --git a/dist/examples/cxx/tree/streaming/streaming-xerces2-7.1.vcproj b/dist/examples/cxx/tree/streaming/streaming-xerces2-7.1.vcproj index 9785c61..b606b8f 100644 --- a/dist/examples/cxx/tree/streaming/streaming-xerces2-7.1.vcproj +++ b/dist/examples/cxx/tree/streaming/streaming-xerces2-7.1.vcproj @@ -121,7 +121,13 @@ RelativePath=".\driver.cxx"> + RelativePath=".\position.cxx"> + + + + + RelativePath=".\position.hxx"> + + + + + RelativePath=".\position.xsd"> + Description="xsd position.xsd" + CommandLine="xsd.exe cxx-tree --generate-serialization --generate-intellisense position.xsd" + Outputs="position.cxx;position.hxx"/> + Description="xsd position.xsd" + CommandLine="xsd.exe cxx-tree --generate-serialization --generate-intellisense position.xsd" + Outputs="position.cxx;position.hxx"/> diff --git a/dist/examples/cxx/tree/streaming/streaming-xerces2-8.0.vcproj b/dist/examples/cxx/tree/streaming/streaming-xerces2-8.0.vcproj index 2008048..fbd555e 100644 --- a/dist/examples/cxx/tree/streaming/streaming-xerces2-8.0.vcproj +++ b/dist/examples/cxx/tree/streaming/streaming-xerces2-8.0.vcproj @@ -350,9 +350,15 @@ > + + + + + + + + diff --git a/dist/examples/cxx/tree/streaming/streaming-xerces2-9.0.vcproj b/dist/examples/cxx/tree/streaming/streaming-xerces2-9.0.vcproj index f94a34b..e3da54b 100644 --- a/dist/examples/cxx/tree/streaming/streaming-xerces2-9.0.vcproj +++ b/dist/examples/cxx/tree/streaming/streaming-xerces2-9.0.vcproj @@ -347,9 +347,15 @@ > + + + + + + + + -- cgit v1.1