One of the most frequent design dilemmas in XML is whether data should be represented as an attribute or a child element:
<!-- Using an attribute -->
<person id="101" name="Sarah" />
<!-- Using child elements -->
<person>
<id>101</id>
<name>Sarah</name>
</person>
Rule of Thumb
Use attributes for metadata about the data (e.g. IDs, languages, dates, currency types) that does not constitute the primary content. Use elements for the data itself, especially when the value might contain multiple words, line breaks, or future child elements.