We now have a youtube channel. Subscribe!

XML DOM | Node Tree

XML DOM - Node Tree

Hello folks! welcome back to a new section of our tutorial on XML DOM. In this tutorial, we are going to be studying about the XML DOM Node Tree.

In an XML document, the information is maintained in a hierarchical structure; this hierarchical structure is referred to as Node Tree. This hierarchy makes it possible for a developer to navigate around the tree in a search for specific information, thus nodes are allowed to access. The content of these nodes can be updated.

The node tree structure starts with the root element and then spreads out to the child elements until the lowest level.


The following example illustrates a simple XML document whose node tree structure is shown below -

<?xml version = "1.0"?>
   <Employee category = "Technical">
   <Employee category = "Non-Technical">

As can be seen in example above whose pictorial representation is as shown below -

XML DOM (Pictorial representation)

  • The topmost node of a tree is known as the root. The root node is <Company> which in turn contains the two nodes of <Employee>. These nodes are referred to as child nodes.
  • The child nodes <Employee> of root node <Company>, in turn consists of its own child nodes (<FirstName>, <LastName>, <ContactNo>).
  • The two child nodes, <Employee> have attribute values Technical and Non-technical, are referred to as attribute nodes.
  • The text within every node is known as the text node.

Alright guys! This is where we are going to be rounding up for this tutorial post. In our next tutorial, we are going to be discussing about XML DOM Methods.

Feel free to ask your questions where necessary and we will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.

Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.

Thanks for reading and bye for now.

Post a Comment

Hello dear readers! Please kindly try your best to make sure your comments comply with our comment policy guidelines. You can visit our comment policy page to view these guidelines which are clearly stated. Thank you.
© 2023 ‧ WebDesignTutorialz. All rights reserved. Developed by Jago Desain