The document tree is the structure of an HTML or an XHTML document. The elements within the HTML and XHTML document will be linked together and will form a document tree. Apart from the root node, every element has only one parent.[1] A document tree consists of:
In the above example, the root element is
[2] http://www.w3schools.com/xml/xml_tree.asp
- Ancestor
- Descendant
- Parent
- Child
- Sibling
1: <?xml version="1.0" encoding="ISO-8859-1"?>
2: <book>
3: <author>Sara Shepard</author>
4: <title>Pretty Little Liars</title>
5: <genre>Young-adult fiction</genre>
6: </book>
In the above example, the root element is
book and the child elements of the root are author, title and genre.Sources:
[1] http://www.guistuff.com/css/css_doctree.html[2] http://www.w3schools.com/xml/xml_tree.asp