The purpose of the XML

XML is designed to transfer and store data.

Syntax rules for XML

  • XMl has a tree structure.
  • XML must contain the root element.
  • The XML declaration is optional and must be placed on the first line if it exists.
  • All elements must contain a closing tag.<p>This is a paragraph.</p>
  • XMl is case-sensitive
  • XML attribute values must be quoted, either in single or double quotes<p value="ac"></p>
  • XML preserves whitespace, so watch out for whitespace

XML naming rules

  1. A name can contain letters, numbers, and other characters
  2. Names cannot start with numbers or punctuation marks
  3. Names cannot start with the letter XML (or XML, XML, and so on)
  4. The name cannot contain Spaces