MENU
Question -

Explain with a help of an example, how root elements are placed in a XML document?



Answer -

XML documents must contain one element that is the parent of all other elements. This element is called the root element. The root element encloses all other elements in XML. All other elements inside the root elements are the form of child element. The structure of the XML file should look like

....
e.g.
101
Rahul
102
Sahil
103
Muskan
You can see in the above example that the root element declared out here is then comes the child element which in turn stores the and of the employee in the tags.

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×