title: XML to CSV using XSL transformation
body: <p>I have a XML data and I need to convert the same to CSV using xsl transformation. But the problem is, the XML rootnodes (refer to A, B, C nodes) varies. Please see below:</p>
  
  <pre><code>XML data
  --------
  &lt;Sheets&gt;
  &lt;A&gt;
  &lt;Data&gt;
  &lt;Row&gt;
  &lt;value1&gt;2&lt;/value1&gt;
  &lt;value2&gt;4&lt;/value2&gt;
  &lt;/Row&gt;
  &lt;Row&gt;
  &lt;value1&gt;5&lt;/value1&gt;
  &lt;value2&gt;6&lt;/value2&gt;
  &lt;/Row&gt;   
  &lt;/Data&gt;
  &lt;/A&gt;
  &lt;B&gt;
  &lt;Data&gt;
  &lt;Row&gt;
  &lt;value1&gt;12&lt;/value1&gt;
  &lt;value2&gt;13&lt;/value2&gt;
  &lt;/Row&gt;
  &lt;Row&gt;
  &lt;value1&gt;14&lt;/value1&gt;
  &lt;value2&gt;15&lt;/value2&gt;
  &lt;/Row&gt;
  &lt;/Data&gt;
  &lt;/B&gt;
  &lt;C&gt;
  &lt;Data&gt;
  &lt;Row&gt;
  &lt;value1&gt;1&lt;/value1&gt;
  &lt;value2&gt;1&lt;/value2&gt;
  &lt;/Row&gt;
  &lt;Row&gt;
  &lt;value1&gt;2&lt;/value1&gt;
  &lt;value2&gt;2&lt;/value2&gt;
  &lt;/Row&gt;
  &lt;/Data&gt;
  &lt;/C&gt;
  &lt;/Sheets&gt;    
  </code></pre>
  
  <pre>
      CSV output should like this:
      ----------------------------
      A, 2, 4
      A, 5, 6
      B, 12, 13
      B, 14, 15
      C, 1, 1
      C, 2, 2
  </pre>
  
  <p>Please help me.</p>
  
  <p>Thanks in advance.</p>