title: Converting XML elements to XML attributes using XSLT
body: <p>We have a current system that outputs an XML file which is in the following format:</p>
  
  <pre><code>&lt;INVENTORY&gt;
     &lt;ITEM&gt;
        &lt;SERIALNUMBER&gt;something&lt;/SERIALNUMBER&gt;
        &lt;LOCATION&gt;something&lt;/LOCATION&gt;
        &lt;BARCODE&gt;something&lt;/BARCODE&gt;
     &lt;/ITEM&gt;
  &lt;/INVENTORY&gt;
  </code></pre>
  
  <p>I need to use this data to load into the standard .NET 2.0 grid. But the grid needs the XML to be in the following format:</p>
  
  <pre><code>&lt;INVENTORY&gt;
     &lt;ITEM serialNumber="something" location="something" barcode="something"&gt;
     &lt;/ITEM&gt;
  &lt;/INVENTORY&gt;
  </code></pre>
  
  <p>i.e. the child nodes of item need to be converted into attributes of the item node.</p>
  
  <p>Does someone know how this can be done using XSLT?</p>