Item 11. Make Structure Explicit through Markup
All structure in an XML document should be indicated through XML tags, not through other means. XML parsers are designed to process tags. They do not see any other form of structure in the data, explicit or implicit. Using anything except tags and their attributes to delineate structure makes the data much harder to read. In essence, programmers who write software to process such documents must invent mini-parsers for the non-XML structures in the data.
For example, in the bank statement XML application we examined in Part 1, a transaction could theoretically be represented like this:
<Transaction>Withdrawal 2003 12 15 200.00</Transaction>
This would require applications reading the data to know ...