From 884dea7531962b17ef843ac2175faa050e8b0758 Mon Sep 17 00:00:00 2001
From: Boris Kolpackov
C++/Tree is a "flattening" mapping in a sense that many levels of
+ nested compositors (choice
and sequence
),
+ all potentially with their own cardinalities, are in the end mapped
+ to a flat set of elements with one of the three cardinality classes
+ discussed above. While this results in a simple and easy to use API
+ for most types, in certain cases, the order of elements in the actual
+ XML documents is not preserved once parsed into the object model. To
+ overcome this limitation we can mark certain schema types, for which
+ content order is not sufficiently preserved, as ordered. For more
+ information on this functionality refer to
+ Section
+ 2.8.4, "Element Order" in the C++/Tree Mapping User Manual.
For complex schemas with many levels of nested compositors
- (xs:choice
and xs:sequence
) it can
+ (choice
and sequence
) it can also
be hard to deduce the cardinality class of a particular element.
The generated Doxygen documentation can greatly help with
this task. For each element and attribute the documentation
clearly identifies its cardinality class. Alternatively, you
can study the generated header files to find out the cardinality
- class of a particular attribute or element. In the next sections
- we will examine how to access and modify information stored in
- an object model using accessor and modifier functions described
- in this section.
In the next sections we will examine how to access and modify + information stored in an object model using accessor and modifier + functions described in this section.