| Chapter 1 | | | Chapter 2 | | | Chapter 3 | | | Chapter 4 | | | Chapter 5 | | | Chapter 6 |
| Chapter 7 | | | Chapter 8 | | | Chapter 9 | | | Chapter 10 | | | Chapter 11 | | | Chapter 12 |
| XML Syntax Rules | ||
|---|---|---|
| Rules | Comment | Example |
| XML is case-sensitive | Use any case- uppercase, lowercase, or mixed- but be consistent. | Correct: <Root></Root> <root></root> <ROOT></ROOT> Incorrect:<Root></ROOT> |
| All tags must have a closing tag | All tags, including empty tags, must have a closing tag. Empty tags are allowed a special form. Empty tags have no content, such as <br> and <img> tags. | <p>This is a paragraph</p> <name>Susan</name> <br /> |
| All documents must have a root element | Include the root or start tag that begins a document. |
<root> <child></child> </root> |
| Elements must be nexted | Elements cannot stand alone unless they are the only root element. |
<club> <name>Spanish</name> </club> |
| Attribute values must be enclosed in quotation marks | Use single or double quotation marks, but be consistent. | <image picture="icon.jpg" /> |
| With XML, white space is preserved | Spaces between words within tags are preserved. | No need for ASCii characters ( ) to add spaces. |
| Source Code: | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Chapter 1 | | | Chapter 2 | | | Chapter 3 | | | Chapter 4 | | | Chapter 5 | | | Chapter 6 |
| Chapter 7 | | | Chapter 8 | | | Chapter 9 | | | Chapter 10 | | | Chapter 11 | | | Chapter 12 |
| top | |< back |