1.5. Common XML Information-Modeling Pitfalls

We could easily arrange the XML fragments from the previous section in other, perfectly acceptable ways. There are many more, albeit syntactically correct, unfortunate ways to arrange the information. Common mistakes made when creating XML documents include:

  • Inadequate context describing what a data element is (incomplete use of tags)

  • Inadequate instructions on how to interpret data elements (incomplete use of attributes)

  • Use of attributes as data elements (improper use of attributes)

  • Use of data elements as metadata instead of using tags (indirection through use of name/value pairings)

  • Unnecessary, unrelated, or redundant tags (poor hierarchy construction)

  • Attributes that have nothing to do with data ...

Get XML Data Management: Native XML and XML-Enabled Database Systems now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.