XML Tree

XML Document gives way to represent information in a structured and self describing manner. When we closely analyze an XML Document it forms a tree structure.

Lets take a look on an example XML Document

The first line is the XML declaration. It defines the XML version and the character encoding used.

Next to it is a root element “inbox” of XML body, there is one child element and three sub child element inside it, and after all there is closing tag of root element.

The terms parent, child, and sibling are used to describe the relationships between elements.