XML Null element and NullValAttr

In XML there are two conventions for storing a value:

  1. It can be stored as an XML attribute with a local element or element reference property Render set to XMLAttribute, XMLElement, XMLElementAttrID, XMLElementAttrVal, or XMLElementAttrIDVal. For example, <element1 val="12"></element1>.
  2. It can be stored as XML content with a local element or element reference property Render set to XMLElement. For example, <element1>12</element1>.

If you set the message set property Encoding Null Num to NULLElement, there is no way to represent a null value for an attribute value. If a null value is present in the tree (from ESQL or another format), an attribute with an empty string is written in the output message.

Conversely, if you have set the message set property Encoding Null Num or Encoding Null Non-Num to NULLValAttr, there is no way to represent a null value for a value rendered as XML content. If a null value is present in the tree, when writing an empty string, an element with no character content is written out instead.

Related concepts
Message modeling
The message model
XML wire 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 handling options