The first line of an XML document is the XML declaration.
It's a special kind of tag:
<?xml version="1.0"?>
The version 1.0 is the actual version of XML.
The XML declaration makes clear that we're talking XML and also which version is used.
The version identification will become important after new versions of XML are used.
All XML documents must have a root element.
All other elements in the same document are children of this root element. The root element is the top level of the structure in an XML document.
<root>
<element>
<sub-element>
content
</sub-element>
<sub-element>
content
</sub-element>
element>
</root>
All elements must be nested. The level of nesting can be arbitrarily deep.
<sales>
<shop>
<number>
100
</number>
<manager>
Ray Bradbury </manager>
</shop>
<product>
<name>
carrots
</name>
<totalprice>
10
</totalprice>
</product>
</sales>