XMLOptional

Define whether the variable can be missing or not. It specifies how a NULL value is interpreted in XML.

Note:
  1. The attribute cannot be set on a type definition.
  2. The attribute cannot be set if the main variable is not a RECORD.

Example

DEFINE myVar RECORD ATTRIBUTES(XMLName="Root")
  val1 INTEGER ATTRIBUTES(XSDint,XMLName="ValOne"),
  val2 FLOAT ATTRIBUTES(XSDdouble,XMLName="ValTwo",XMLOptional)
END RECORD
<Root>
  <ValOne>458</ValOne>
  <ValTwo>58.48</ValTwo>
</Root>
<Root>
  <ValOne>458</ValOne>
</Root>