XML Tree Structure
In the previous tutorials we learned about XML syntax and discussed few examples of XML. In this guide, we will talk about the Tree structure of a XML document.
XML Tree
XML document has a tree structure, where the root element is at the top and the child elements are connected to the root elements, the same way, how leaves are connected to tree through branches. We will first see an example of XML document and then we will draw a tree structure based on the example.
Example of XML document
Negan
40
imnegan@twd.com
Noida
Uttar Pradesh
201301
Near hill top
Tree Structure
The tree structure of the above XML document would look like this:
XML Tree Structure
Root element:
Child elements: , , &
Sub-child elements: , , &