<typemap> Declaration

The customization values in <typemap> binding declarations are used to map a specific XSD type, or a space-separated list of XSD types, to a C type. This can be done at global or schema level. An example usage would be to preserve the format of floating point numbers after decoding and reencoding, by mapping those types to a string representation.

Usage

   <typemap>
          [<xsdtype>. . .<xsdtype>]
          [<ctype>. . .<ctype>]
          ...
   </typemap>

<xsdtype> is used to specify the XSD Type being mapped, and <ctype> is used to specify the C Type. Refer to the description of <ctype> in the section on <nodeBindings>.

Example

To map xsd:decimal, xsd:double and xsd:float types to string:

   <typemap>
          <xsdtype>decimal double float</xsdtype>
          <ctype>string</ctype>
   </typemap>

It is possible to specify multiple mappings by having multiple pairs of <xsdtype> and <ctype> elements.