Customizing XML serialization

The following attributes are used to change the default serialization of BDL into XML, and vice-versa. Some of these attributes cannot have values; for the others a value is mandatory.

The following attributes cannot have values:

Table 1. XML Serialization customizing - Attributes that cannot have values
Attribute Definition
XMLOptional Define whether the variable can be missing.
XMLElement Map a BDL simple data type to an XML Element.
XMLAttribute Map a BDL simple data type to an XML Attribute.
XMLBase Set the base type of an XML Schema simpleContent.
XMLAll Map a BDL Record to an XML Schema all structure.
XMLChoice Map a BDL Record to an XML Schema choice structure.
XMLSequence Map a BDL Record to an XML Schema sequence structure.
XMLSimpleContent Map a BDL Record to an XML Schema simpleContent structure.
XSComplexType Map a BDL Record type definition to an XML Schema complexType.
XMLList Map a one-dimensional array to an XML Schema list.
XMLSelector Define which member of an XMLChoice record is selected.
XMLAny Map a Xml.DomDocument object to a wildcard XML element node.
XMLAnyAttribute Map a BDL one-dimensional dynamic array of a record with 3 strings to XML wildcard attributes.

Values are mandatory for the following attributes: (for example, XMLName="myname")

Table 2. XML Serialization customizing - Attributes that must have values
Attribute Definition
XMLName Define the XML Name of a variable in an XML document.
XMLNamespace Define the XML Namespace of a variable in an XML document.
XMLType Force the XML type name of a variable.
XMLTypenamespace Force the XML type namespace of a variable.
XSTypename Define the XML Type Name of a BDL type definition.
XSTypenamespace Define the XML Type Namespace of a BDL type definition.
XMLElementNamespace Define the default XML namespace of all children defined as XMLElement in a Record.
XMLAttributeNamespace Define the default XML namespace of all children defined as XMLAttribute in a Record.