Elements
XML elements are mapped as dynamic class fields.
There are three cases for XML elements:
-
Simple types can be of two kinds:
A built-in type
A type that has been redefined by the user by inheritance
Complex types are represented as dynamic classes.
-
Collections can be for both simple or complex types.
For complex types, the result is a vector of IlrXmlObject instances.
-
For simple types, there are two options:
A vector of the mapped class is used, for example, String.
For primitive types, a wrapper is used. For example, int could be mapped onto Integer.
Collections are defined by elements with the attributes minOccurs or maxOccurs having a value higher than 1. In this case, such elements are mapped to Vector attributes. A List suffix is appended to the name of the element. For example:
<element name = "item" type = "item" maxOccurs="10"/>is mapped to the attribute Vector itemList, which contains instances of the dynamic class Item.