title: Setting up XML file - use attr or elements for multiple values
body: <p>I am setting up an XML file for a web site that I am creating. The XML file is to contain art (image) details. Each art record can have multiple sizes available (size1, size2, etc.) for purchase and multiple categories (cat1, cat2, cat3, etc). What is the best way to setup the xml file for multiple values? Here are the two options that I can think of.</p>
  
  <hr>
  
  <p>...With elements for size and category...</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8' ?&gt;
  &lt;images&gt;
      &lt;image id='' ImageName=''&gt;
          &lt;title&gt;&lt;/title&gt;
  
          &lt;sizes&gt;
              &lt;size&gt;size1&lt;/size&gt;
              &lt;size&gt;size2&lt;/size&gt;
          &lt;/sizes&gt;
  
          &lt;categories&gt;
              &lt;category&gt;cat1&lt;/category&gt;
              &lt;category&gt;cat2&lt;/category&gt;
          &lt;/categories&gt;
  
          &lt;description&gt;
              &lt;short&gt;&lt;/short&gt;
              &lt;long&gt;&lt;/long&gt;
          &lt;/description&gt;
      &lt;/image&gt;
  &lt;/images&gt;
  </code></pre>
  
  <p>with JQuery ajax, I reference each size / category with the following...</p>
  
  <pre><code>$(xml).find('image').each(function(){
      $(this).find('size').each(function(){
          var size = $(this).text();
          {do something here with the size variable}
      });
  });
  </code></pre>
  
  <hr>
  
  <p>...OR...</p>
  
  <hr>
  
  <p>...With attributes for size and category...</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8' ?&gt;
  &lt;images&gt;
      &lt;image id='' ImageName='' sizes='size1 size2' category='cat1 cat2 cat3'&gt;
          &lt;title&gt;&lt;/title&gt;
  
          &lt;description&gt;
              &lt;short&gt;&lt;/short&gt;
              &lt;long&gt;&lt;/long&gt;
          &lt;/description&gt;
      &lt;/image&gt;
  &lt;/images&gt;
  </code></pre>
  
  <p>with JQuery ajax, I can reference each size / category with the following...</p>
  
  <pre><code>$(xml).find('image').each(function(){
      $(this).attr('size').split(' ');
          {Loop through each split attribute}
  });
  </code></pre>
  
  <hr>
  
  <p>Any help is much appreciated.</p>