I prefer to use a mixed approach; for attributes that are 1:1 and directly relate to the parent node, I use an inline notation (second example above). For anything that could be consider a 1 : many relationship, or considered a child element, rather than an attribute, I use a nested element (first example above). Of note, nested elements can have their own attributes.
Taken from
http://en.wikipedia.org/wiki/XML#Well-formed_documents:_XML_syntax <recipe name="bread" prep_time="5 mins" cook_time="3 hours">
<title>Basic bread</title>
<ingredient amount="8" unit="dL">Flour</ingredient>
<ingredient amount="10" unit="grams">Yeast</ingredient>
<ingredient amount="4" unit="dL" state="warm">Water</ingredient>
<ingredient amount="1" unit="teaspoon">Salt</ingredient>
<instructions>
<step>Mix all ingredients together.</step>
<step>Knead thoroughly.</step>
<step>Cover with a cloth, and leave for one hour in warm room.</step>
<step>Knead again.</step>
<step>Place in a bread baking tin.</step>
<step>Cover with a cloth, and leave for one hour in warm room.</step>
<step>Bake in the oven at 180(degrees)C for 30 minutes.</step>
</instructions>
</recipe>
One reason I take this approach is that it maps well to a relational table structure.