A simple XML example
<?xml version=”1.0″ encoding=”ISO-8859-1″?>
The first line is the XML declaration. It defines the XML version (1.0) and the encoding used (ISO-8859-1 = Latin-
1/West European character set).
The next line describes the root element of the document (like saying: “this document gives details of
The next three lines give the details:
And the last line gives the end of root tag/element:
XML documents form a tree data structure. The root has child tags and child tags can have more child tags.
These child tags share the relation of siblings. Actually, speaking in one line, they are related as a family with
parents, children, grandparents, siblings and many more…