A simple XML element comprises an opening tag, content, and a closing tag whose only difference with the opening tag is an initial forward slash.
<animal>
<animal>T1</animal>
</animal>
The closing tag is not optional.
The rules for naming regular elements: case matters; names must begin with a letter, underscore or colon; names may contain letters, digits, underscores, hyphens, periods, and colons; colons are generally only used for specifying namespaces; and names that begin with the letters x, m, and l (in any combination of upper-and lowercase) are reserved by the W3C.
Names need not be in English or even the Latin alphabet.
You define which tags are allowed in an XML document by using a schema.
|