Go to previous pageGo to next page

1.3.6. Unit-Summary

The syntax rules of XML are very simple and very strict.

As we already told you, XML uses tags. There exist a few rules that have to be applied when using tags in an XML document:

  • All XML elements must have a closing tag
  • All XML elements must be properly nested
  • XML tags are case sensitive
  • All XML documents must have a root element

An XML document must have a root element and within this root element there can be as many nested elements as one pleases.

XML elements have relationships that are of the following four types:

  • Root Element
  • Parent Element
  • Sibling (Sister Element)
  • Child Element

As we told you in the former unit, XML allows the author to define his own tags and his own document structure. When naming the XML elements the following rules have to be followed:

  • Names can contain letters, numbers, and other characters
  • Names must not start with a number or punctuation characters. Names must not start with the letters xml (or XML, or Xml, etc.)
  • Names cannot contain spaces.


Go to previous page
Go to next page