The XML Wire Format supports handling of null values within messages. Encoding null properties for XML are set only on the message set and apply to all the defined objects within the message set.
You can use the following two properties to represent the numeric and non-numeric encoding for NULL within the XML Wire Format:
These represent the numeric and non-numeric encoding for NULL respectively.
Each of these encodings has six 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 will cause the element myElem to be given a value NULL:
Encoding Numeric Null |
Encoding Numeric Null Value |
Example XML |
---|---|---|
NULLEmpty | <myElem/> <myElem></myElem> |
|
NULLValue | zzz | <myElem>zzz</myElem> |
NULLXMLSchema | <myElem xsi:nil='true'/>1 | |
NULLValueAttribute | <myElem></myElem>2 <parent id="myElem"></parent>3 |
|
NULLElement | null4 | <myElem><null/></myElem> |
NULLAttribute | null4 | <myElem null='true'/>1 |
Notes:
|
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).
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ad06720_ |