Instantiating an element

A XML tag node in the element definition represents an element instance. The tag name is the class name of the element, and attributes whose name starts with lowercase character define the field value of the element instance. Attributes whose name starts with uppercase character define the relationship between the tag and its parent tag. For the naming rules, see Attribute naming rules.

There is a special attribute id. It only makes sense to the root tag of one element definition. You can get the element instance by calling the method Element getElement(String id). The subtag represents an internal element instance of its parent tag node, and you cannot get it from id directly. It makes no sense if you define the attribute id to the subtags.

Each XML tag node represents an element instance. This section describes how the BasicElementFactory creates the element instance from XML definition: by default constructor, by constructor, by static factory and by instance factory.

BasicElementFactory uses the attribute Instantiate to determine the way to create element instance.