How XML support TREE Structure?

How XML support TREE Structure?

In XML document we called root element to the parent node and create other child tags with in the root.So,It creates a structure like tree.In this tree starts at the root and branches made at the  lowest level of the tree.I have given you a example which shows a tree structure.Syntax:<root>  <child>    <subchild>.....</subchild>  </child></root>Example:<bookstore><book category=\"JAVA\">  <title lang=\"en\">The Complete Reference</title>   <author>Herbert Schildt</author>   <year>2005</year>   <price>30.91</price> </book><book category=\"C++\">  <title lang=\"en\">Programming in ANSI C++</title>   <author>E Balaguruswamy</author>   <year>2007</year>   <price>38.99</price> </book><book category=\"C\">  <title lang=\"en\">Exploring C</title>   <author>Yashwant kanetkar</author>   <year>2006</year>   <price>42.95</price> </book></bookstore> Above, I have started with  bookstore category. It is called root node.Than after create a child node like:book.Than creates the attributes like:title,author,year and price attributes and assign values to them.This is look like a tree shape structure.



By:Vivek
Date:2014-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related XML Subjective Links

XML Subjective interview questions and answers for experienced and fresher