aboutsummaryrefslogtreecommitdiff
path: root/examples/cxx/serializer/library/README
blob: 82ca09c80a693521173e503514e3d205c1d8b3a3 (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
38
39
40
41
42
43
44
This example shows how to use the Embedded C++/Serializer
mapping to create XML documents from a custom in-memory
object model.

The example consists of the following files:

library.xsd
  XML Schema which describes a library of books.

library.hxx
  Types that describe a library of books in C++. These are
  hand-written.

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

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

library-simpl-mixin.hxx
library-simpl-mixin.cxx

library-simpl-tiein.hxx
library-simpl-tiein.cxx
  Serializer implementations (using either mixin or tiein
  parser reuse style) that serialize the custom in-memory
  object model to XML. These are hand-written implementations
  of the serializer skeletons defined in library-sskel.hxx.

driver.cxx
  Driver for the example. It first constructs a sample
  object model using the types from library.hxx. It then
  creates a serializer instance using all the individual
  serializers found in one of library-simpl-*.hxx. Finally,
  it invokes this serializer instance to serialize the sample
  object model to an XML document which is printed to STDOUT.

To run the example simply execute:

$ ./driver