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
- A name can contain letters, numbers, and other characters
- Names cannot start with numbers or punctuation marks
- Names cannot start with the letter XML (or XML, XML, and so on)
- The name cannot contain Spaces