␡
- Rule 1: All XML Must Have a Root Element
- Rule 2: All Tags Must Be Closed
- Rule 3: All Tags Must Be Properly Nested
- Rule 4: Tag Names Have Strict Limits
- Rule 5: Tag Names Are Case Sensitive
- Rule 6: Tag Names Cannot Contain Spaces
- Rule 7: Attribute Values Must Appear Within Quotes
- Rule 8: White Space Is Preserved
- Rule 9: Avoid HTML Tags (Optional)
Like this article? We recommend
Rule 8: White Space Is Preserved
If you’re in the habit of adding extra spaces and hard returns in your HTML code, watch out! Such spacing is honored by XML and can play havoc with your applications. Use extra spacing judiciously.