Xml
If an XML document conforms to some basic specification, it is a structural specification. XML format has a simpler parsing rule than HTML, allowing XML parsers to parse XML data without external description or understanding of the meaning of the data.
Start and end tags must match
XML elements can contain body text and other elements, and the type of document is given in strict specifications in its schema. However, the elements must be tightly nested: Each start tag must have a corresponding closing tag.
Elements cannot overlap
The following example does not conform to the XML syntax.
<title>evolution of Culture <sub>in Animals
</title> by John T. bonner</sub>
The following grammatical forms are corrected:
<title>evolution of Culture
<sub>in animals</sub>
<author>by John T. bonner</author>
</title>
XML tags are sensitive to case
Here are the different elements.
<City> <CITY> <city>
Represents an empty element
XML has a shorthand approach to empty elements: a tag that ends with a/> symbol represents an empty element. For example, the following two lines are equivalent:
<title/>
<title></title>
Reserved characters
Some characters are part of the XML syntactic structure. If you want to reference them in XML data, you must replace them with special characters. These characters are listed below.
< <
& &
> >
" "
" '
For example, "Melons Cost < A&p" is written as "melons cost < $ at" A&p.
Each XML document must have a unique root element. For example, in weather reports, Element <weather-report> represents the only root element of the XML document.