XML Null handling options

The XML Wire Format supports the handling of null values in messages. Encoding null properties for XML are set only on the message set, and apply to all the defined objects in the message set.

You can use the following two properties to represent the numeric and non-numeric encoding for NULL in the XML Wire Format:

These properties represent the numeric and non-numeric encoding for NULL respectively.

Each of these encodings has the following enumerated values:

You do not have to supply additional information for NULLEmpty, NULLXMLSchema, and NULLValueAttribute, but if you select NULLValue, NULLAttribute, or NULLElement, you must define further values to be assigned to represent the NULL condition in the Encoding Numeric Null Value and Encoding Non-Numeric Null Value message set properties.

The following table shows how each encoding works. For each encoding, the example XML causes the element myElem to be given a value NULL.

Encoding Numeric Null
Encoding Non-Numeric Null

Encoding Numeric Null Value
Encoding Non-Numeric Null Value

Example XML
NULLEmpty  
<myElem/>
<myElem></myElem>
NULLValue zzz <myElem>zzz</myElem>
NULLXMLSchema   <myElem xsi:nil='true'/>1 5
NULLValueAttribute  
<myElem></myElem>2
<parent id="myElem"></parent>3
NULLElement null4 <myElem><null/></myElem>
NULLAttribute null4 <myElem null='true'/>1
Notes:
  1. The attribute must evaluate to true, so the value must be true, 1, or the Boolean True Value property.
  2. This value is valid only for XMLElementAttrVal element rendering, as specified in XML rendering options. Marking an element as being rendered in this way, and setting it to null, is equivalent to removing the attribute of the element that provides the element's value.
  3. This value is valid only for XMLElementAttrIdVal element rendering, as specified in XML rendering options. Marking an element as being rendered in this way, and setting it to null, is equivalent to removing the attribute of the element that provides the element's value, but not removing the attribute that provides the element's name.
  4. Both NULLElement and NULLAttribute are deprecated. The element or attribute name provided must not include a namespace URI or prefix. If namespaces are enabled for the message set, the name matches any namespace.
  5. Start of changexsi:nil is not supported with complex elements of MRM-XML.End of change
Related concepts
Message modeling
The message model
MRM XML physical format: relationship to the logical model
Related tasks
Developing message models
Working with message model objects
Related reference
Message model reference information
Message model object properties
Additional MRM domain information
Additional XML information
XML Null value
XML Null representation for Binary data
XML Wire Format message set properties
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009.
Last updated : 2009-01-07 15:20:53

ad06720_