title: Best practices: XML attribute vs XML element - When should I use elements and when should I use attributes?
body: <p>Which would be the correct format for this XML data, are they equivalent or are there trade offs between the two?</p>
  
  <p>1.</p>
  
  <pre><code>&lt;sitemap&gt;
    &lt;category name="Animals"&gt;
      &lt;section title="Dogs"&gt;
        &lt;page url="/pics/greatdane.jpg" title="Great Dane"/&gt;
      &lt;/section&gt;
    &lt;/category&gt;
  &lt;/sitemap&gt;
  </code></pre>
  
  <p>2.</p>
  
  <pre><code>&lt;sitemap&gt;
    &lt;page&gt;
      &lt;category&gt;Animals&lt;/category&gt;
      &lt;section&gt;Dogs&lt;/section&gt;
      &lt;title&gt;Great Dane&lt;/title&gt;
      &lt;url&gt;/pics/greatdane.jpg&lt;/url&gt;    
    &lt;/page&gt;
  &lt;/sitemap&gt;
  </code></pre>
  
  <p>I've implemented the first example with my style sheet and it seems to work fine, but I'm unsure what the correct form should be.</p>