An XML document is simply a tree composed of a hierarchy of elements . In fact the document (exclusive of its optional prologue and extremely rare epilogue ) is a single XML element. Since an element includes its child elements, a thousand-element tree, if properly formed , is also a single element ”the one at the root.
An element appears in the Flash dataspace as a node. The root element appears as the only child element of the document. Each element has multiple pointers into the hierarchy: parent, siblings, and children. Each carries a list of the names and values of all its attributes. In sub-sequent chapters we become familiar with the precise arrangement of these data, and we become comfortable tracing and manipulating them.
An element is bracketed by a pair of tags. The information between these tags is the content of the element. The content can be nothing (it often is) or it can be a hideously complex and bulky data structure with hundreds of other complicated elements (it often is). Attribute information, if present, must be embedded in the start tag.The form of the element ID:
<start tag>optional content</end tag>
In the case of an empty element (which contains no content, though it has a name and may have attributes), the start tag and end tag are immediately consecutive and can be fused into a special symbol:
<empty element tag/>
Each element must have
Additionally, every element can contain any, all, or none of the following:
It may not have
Examples of Elements