The XML wire format layer supports handling
of null values within messages. NULL properties for XML are set for a message
set only and apply to all the defined objects within the message set.
You can use the following
two NULL encoding properties to represent the numeric and non-numeric encoding
for NULL within the XML layer:
- Encoding Null Num
- Encoding Null Non-Num
These represent the numeric and non numeric encoding
for NULL within the XML layer:
- The numeric data types are:
- Decimal schema types: decimal, integer, negativeInteger,
nonNegativeInteger, nonPositiveInteger, positiveInteger
- Float
schema types: double, float
- Integer schema types:
byte, int, long, short, unsignedByte, unsignedInt, unsignedLong, unsignedShort
- The non numeric data types are:
- Binary schema types: base64Binary, hexBinary
- Boolean schema types: Boolean
- DateTime
schema types: date, dateTime, gDay, gMonth, gMonthDay, gYear, gYearMonth,
time
- String schema types: anyURI, duration, ENTITIES, ENTITY, ID,
IDREF, IDREFS, language, Name, NCName, NMTOKEN, NMTOKENS, normalizedString,
NOTATION, QName, string, token
Each of these encodings has six enumerated values:
- NULLEmpty (default)
- NULLValue
- NULLElement
- NULLValAttr
- NULLXMLSchema
The table below defines the XML options
for encoding null values.
Encoding Null Num
Encoding Null Non-Num
|
Encoding Null Num Val
Encoding Null Non-Num Val
|
Example XML |
NULLEmpty (default) |
not applicable |
<child></child> |
NULLValue |
zzz |
<child>zzz</child> |
NULLElement |
null |
<child><null/></child> |
NULLValueAttribute |
not applicable |
<child></child>2
<child id="X"></child>3
|
NULLXMLSchema |
null |
<child null='true'>1 |
Notes: - The value of Boolean True is
used.
- This is only valid for XMLElementAttrVal element
rendering, as specified in XML Message 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 detailed the element's
value.
- This is only valid for XMLElementAttrIdVal element
rendering, as specified in XML Message 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 detailed the element's
value, but not removing the attribute id.
|
You do not have to supply additional clarification for NULLEmpty and NULLValAttr,
but if you select NULLValue, NULLAttribute, or NULLElement,
you must define further values to be assigned to represent the NULL condition
in the Encoding Null Num Value and Encoding Null Non-Num Value message set
properties (see the table above).