aboutsummaryrefslogtreecommitdiff
path: root/examples/cxx/hybrid/wildcard/README
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cxx/hybrid/wildcard/README')
-rw-r--r--examples/cxx/hybrid/wildcard/README76
1 files changed, 76 insertions, 0 deletions
diff --git a/examples/cxx/hybrid/wildcard/README b/examples/cxx/hybrid/wildcard/README
new file mode 100644
index 0000000..d54b081
--- /dev/null
+++ b/examples/cxx/hybrid/wildcard/README
@@ -0,0 +1,76 @@
+This example shows how to parse, store in the object model, and serialize
+XML data matched by XML Schema wildcards (any and anyAttribute) using the
+Embedded C++/Hybrid mapping.
+
+This example uses the object model as well as parser and serializer
+customization mechanisms provided by the C++/Hybrid mapping. For more
+information, see Section 4.8, "Customizing the Object Model" and Section
+6.1, "Customizing Parsers and Serializers" in the Embedded C++/Hybrid
+Mapping Getting Started Guide.
+
+The example consists of the following files:
+
+email.xsd
+ XML Schema which describes a simple email format with the
+ extensible envelope type.
+
+email.xml
+ Sample email message.
+
+email.hxx
+email.cxx
+
+email-pskel.hxx
+email-pskel.cxx
+email-pimpl.hxx
+email-pimpl.cxx
+
+email-pskel.hxx
+email-pskel.cxx
+email-pimpl.hxx
+email-pimpl.cxx
+ Object model (the first pair of files), parser skeletons (the
+ second pair), parser implementations (the third pair), serializer
+ skeletons (the fourth pair), and serializer implementations (the
+ fifth pair). These files are generated by the XSD/e compiler from
+ email.xsd. The --generate-parser, --generate-serializer, and
+ --generate-aggregate options were used to request the generation of
+ the parsing and serialization code. The --custom-data option was
+ used to request addition of custom data to the envelope class in
+ the object model. The --custom-parser option was used to customize
+ the envelope_pimpl parser implementation. The --custom-serializer
+ option was used to customize the envelope_simpl serializer
+ implementation.
+
+body.hxx
+body.cxx
+ Implementation of the body class. It is used to store the wildcard
+ data in the custom data sequence in the envelope class.
+
+envelope-pimpl.hxx
+envelope-pimpl.cxx
+ Custom envelope parser implementation. It uses the implementation
+ generated by the XSD/e compiler as a base and overrides the wildcard
+ callbacks to parse the wildcard content and store it as custom data
+ in the envelope object.
+
+envelope-simpl.hxx
+envelope-simpl.cxx
+ Custom envelope serializer implementation. It uses the implementation
+ generated by the XSD/e compiler as a base and overrides the wildcard
+ callbacks to serialize the wildcard content stored as custom data in
+ the envelope object.
+
+driver.cxx
+ Driver for the example. It first calls the parser that constructs the
+ email object from the input XML file. It then prints the content of
+ the email to STDERR. Finally, the driver creates a reply email and
+ calls the serializer to serialize it to XML.
+
+To run the example on the sample XML instance document simply execute:
+
+$ ./driver email.xml
+
+The example reads from STDIN if input file is not specified:
+
+$ ./driver <email.xml