summaryrefslogtreecommitdiff
path: root/xsd/examples/cxx/tree/messaging/README
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2024-03-06 10:24:11 +0100
committerJörg Frings-Fürst <debian@jff.email>2024-03-06 10:24:11 +0100
commit4538829ab86b5a1cd4e845e7eab165029c9d6d46 (patch)
treebbadf39aed0610c8f8f7b41fefff47773b8ac205 /xsd/examples/cxx/tree/messaging/README
parent23d41842168ac1a1580111b9c5c73500ceee3d57 (diff)
parentaad5ad9bf0c02aa4e79bc6b7d6c934612fff4026 (diff)
Update upstream source from tag 'upstream/4.2.0'
Update to upstream version '4.2.0' with Debian dir 1b38df7bbcf313223de3c50107ac0255090fe647
Diffstat (limited to 'xsd/examples/cxx/tree/messaging/README')
-rw-r--r--xsd/examples/cxx/tree/messaging/README58
1 files changed, 0 insertions, 58 deletions
diff --git a/xsd/examples/cxx/tree/messaging/README b/xsd/examples/cxx/tree/messaging/README
deleted file mode 100644
index 435a4cf..0000000
--- a/xsd/examples/cxx/tree/messaging/README
+++ /dev/null
@@ -1,58 +0,0 @@
-This example shows how to handle XML vocabularies with multiple
-root elements using the element type and element map features
-of the C++/Tree mapping. The main purpose of element types is
-to distinguish object models with the same root type but with
-different root elements. The element map allows uniform parsing
-and serialization of multiple root elements.
-
-The example consists of the following files:
-
-protocol.xsd
- XML Schema which defines a simple bank account protocol with
- requests such as withdraw and deposit. Note that some request
- and response elements are of the same type.
-
-balance.xml
-withdraw.xml
-deposit.xml
- Sample XML instances for the protocol requests.
-
-protocol.hxx
-protocol.cxx
- C++ types that represent the given vocabulary. These are
- generated by the XSD compiler from protocol.xsd. Generation of
- element types instead of parsing and serialization functions is
- requested with the --generate-element-type option. Generation of
- the element map is requested with the --generate-element-map
- option.
-
-dom-parse.hxx
-dom-parse.cxx
- Definition and implementation of the parse() function that
- parses an XML document to a DOM document.
-
-dom-serialize.hxx
-dom-serialize.cxx
- Definition and implementation of the serialize() function that
- serializes a DOM document to XML.
-
-driver.cxx
- Driver for the example. It first calls the above-mentioned parse()
- function to parse the input file to a DOM document. It then calls
- the parse() function on the element map to parse the root document
- element to the object model. The object model is returned as a
- pointer to xml_schema::element_type which is a common base type for
- all element types. The driver then determines which request it has
- received either using RTTI or by comparing the root element names.
- Once the request type is determined, information about it is printed
- to STDERR and the corresponding response is created. Finally, the
- driver serializes the opaque response object to a DOM document
- using the element map and then serializes this DOM document to
- STDOUT using the above-mentioned serialize() function.
-
-To run the example on the sample XML request documents simply
-execute:
-
-$ ./driver balance.xml
-$ ./driver withdraw.xml
-$ ./driver deposit.xml