XMLOptional

Define whether the variable can be missing or not. It specifies how a 4GL 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.
DEFINE myVar RECORD ATTRIBUTE(XMLName="Root")
  val1 INTEGER ATTRIBUTE(XSDint,XMLName="ValOne"),
  val2 FLOAT ATTRIBUTE(XSDdouble,XMLName="ValTwo",XMLOptional)
END RECORD
<Root>
  <ValOne>458</ValOne>
  <ValTwo>58.48</ValTwo>
</Root>
<Root>
  <ValOne>458</ValOne>
</Root>