Writing Non-Empty Elements : Well Formed « Introduction « XML Tutorial






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.








1.3.Well Formed
1.3.1.XML documents must adhere to certain rules to be well formed.
1.3.2.XML Naming Conventions
1.3.3.Case Sensitivity
1.3.4.Writing Non-Empty Elements
1.3.5.Nesting Elements
1.3.6.Empty Elements