19. XML Attribute Recommended Use

Sometimes the assignment of "id" references to elements is handy. The "id" references can be used to access XML elements in much the same way as the "name" or "id" attributes in HTML.

The "id" can be used as a counter, or a unique identifier to identify the different nodes in an XML file and not part of the element data.

Metadata (data about data) should be stored as attributes, and data itself should be stored as elements.