IBM Integration Bus, Version 10.0.0.2 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS


Message Sets: 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 Message Sets: 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 Message Sets: 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. xsi:nil is not supported with complex elements of MRM-XML.

ad06720_.htm | Last updated 2015-09-24 12:52:12