<p>What's the difference between the two and when should I use each:</p>

<pre><code>&lt;person&gt;
     &lt;firstname&gt;Joe&lt;/firstname&gt;
     &lt;lastname&gt;Plumber&lt;/lastname&gt;
&lt;/person&gt;
</code></pre>

<p>versus</p>

<pre><code>&lt;person firstname="Joe" lastname="Plumber" /&gt;
</code></pre>

<p>Thanks</p>

In my company, we would favour the 2nd approach.
The way we think about it is that "firstname" and "lastname" are
attributes
of the "person" node, rather than
sub-fields
of the "person" node.  It's a subtle difference.
In my opinion the 2nd approach is more concise, and readability/maintainability is significantly improved, which is very important.
Of course it would depend on your application.  I don't think there is a blanket rule that covers all scenarios.