elements of xml file system..

by barkkathulla 2012-09-22 11:47:53


EVERY VALID XML DOCUMENT MUST ALWAYS HAVE ONE SINGLE ELEMENT THAT ENTIRELY ENCLOSED ALL THE OTHER ELEMENTS IN THE DOCUMENT.THIS ELEMENT IS CALLED THE ‘ROOT’ ELEMENT.

ELEMENTSTHAT ARE DIRECTLY CONTAINED WITHIN THE ROOT ELEMENT ARE SAID TO BE ‘NESTED’ WITHIN THE ROOT ELEMENT.FURTHER ELEMENTS CAN BE NESTED WITHIN THOSE ELEMENTS TO FORM A SHORT OF HIERARCHY.

AN ELEMENT THAT IS ENCLOSED BY ANOTHER ELEMENT IS CALLED A ‘CHILD’ OF THE CONTAINING ELEMENT.CONVERSELY THE CONTAING ELEMENT IS CALLED THE ‘PARENT’ O FTHE ENCLOSED ELEMENT.

IN THE CODE SHOWN BELOW THE ROOT ELEMENT IS NAMED ‘PERSONNEL’ .THE PERSONNEL ROOT ELEMENT CONTAINS TWO CHILD ELEMENTS THAT ARE EACH NAMED ‘ENTRY’.EACH ENTRY ELEMENT ENCLOSED ITS OWN CHILD ELEMENT CALLED ‘NAME’ THAT CONTAINS SOME CONTANT DATA.

Tagged in:

509
like
0
dislike
0
mail
flag

You must LOGIN to add comments