XML組成的最小單位為element:
1. start tag
2. value
3. end tag
XML語法規則:
1. every start-tag must have a matching end-tag , or be a self-closing tag
2. tags can’t overlap; elements must be properly nested
– close the child elements before you close their parents
3. XML documents can have only one root element
4. Obey XML naming conventions
– start with letter or the dash
– after first charcter , number, hyphens, perods are allowed
– Names can’t contain spaces
– Names can’t contain the colon character
– Names can’t start with the letters xml(xml, XML, Xml)
– no space after the opening < character
5. XML is case sensitive
6. XML will keep whitespace in your PCDATA