@XMLRootElement

The @XMLRootElement complex property provides naming and data-type details about the root XML element, which is the topmost, most inclusive element in the XML string. The property fields are as follows:
name
The name of the root XML element. The default value is the name of the Record part.

If you are writing a record to an XML string, the value of the property field is assigned to the topmost element in the XML string. If you are reading an XML string into a record and the name of the topmost XML element does not match the value of the property field, the EGL runtime code issues a RuntimeException.

namespace

The XML namespace that is associated with the root XML element. You must specify the namespace even if it is a default namespace.

If you specify a namespace, the following statements apply:
  • If you are writing a record to an XML string, a namespace is assigned. In this case, the EGL runtime code assigns a namespace prefix.
  • If you are reading an XML string into a record and the element is not in the specified namespace, whether the namespace in the XML string is specified by a prefix or a namespace default, a RuntimeException occurs.
If you do not specify a namespace, the following statements apply:
  • If you are writing a record to an XML string, a namespace prefix is not specified, and the element is not in a namespace
  • If you are reading an XML string into a record and the element is in a namespace, a RuntimeException occurs.
nillable
A Boolean value that indicates whether the element to be written to an XML string is nillable. The choices are as follows:
  • If the value is false (the default), the EGL runtime code does not write an element to the XML string when the content is null.
  • If the value is true, an attempt to write a null from the record to the XML string results in an empty element that includes the xsi:nil="true" attribute value and has no other attributes.

The nullable aspect of a record field affects what occurs when the EGL runtime code reads an XML string into a record. For more details, see "Copying an XML string to and from an EGL variable."


Feedback