aboutsummaryrefslogtreecommitdiff
path: root/examples/cxx/serializer/wildcard/README
blob: 831a2d468629e3068d46d74c3bb7faf61667efc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
This example shows how to serialize XML data matched by XML Schema
wildcards (any and anyAttribute) using the Embedded C++/Serializer
mapping.

The example consists of the following files:

email.xsd
  XML Schema which describes a simple email format with the
  extensible envelope type.

email.hxx
  C++ types that describe the email format defined in email.xsd.
  These are hand-written.

email.map
  Type map. It maps XML Schema types defined in email.xsd to C++
  types defined in email.hxx.

email-sskel.hxx
email-sskel.cxx
  Serializer skeletons generated by XSD/e from email.xsd and
  email.map.

driver.cxx
  Serializer implementations and a driver for the example. The
  serializer implementations serialize the in-memory object model
  defined in email.hxx to XML. The driver first constructs a sample
  email object using the types from email.hxx. It then creates a
  serializer instance using the serializer implementations mentioned
  above and a couple of predefined serializers for the XML Schema
  built-in types. Finally, it invokes this serializer instance to
  serialize the sample email object to an XML document which is
  printed to STDOUT.

To run the example simply execute:

$ ./driver