Chapter 5. XSD Complex Type to C/C++ Type Mappings

Table of Contents

SEQUENCE
ALL
CHOICE
Substitution Groups
Attributes
ComplexContent
SimpleContent
Derivations
Group
Any Type

XSD complex type declarations are mapped to one or more C structured types or C++ classes. The actual mappings are influenced by several factors including the level of nesting of complex type structures within other complex types, facets that are applied to complex type groups and elements, and attributes that are added to the types.

The equivalent C type and C++ class definitions for each of the various XSD complex types follow.

Note that in when the mixed="true" attribute is set for a complex type, its contents will be stored as text in a string variable named _content. This allows text to appear between elements. To generate a structure with data members that match the complex type’s content model, use the -nomixed command line option to disable support for mixed content.