title: Convert from XML to CSV
body: <p>I have been searching for the solution to convert XML into CSV, but I cannot find one which matches my case as XML structure is different</p>
  
  <p>XML structure looks like</p>
  
  <pre><code>&lt;VWSRecipeFile&gt;
      &lt;EX_Extrusion User="ABC" Version="1.0" Description="" LastChange="41914.7876341204"&gt;
          &lt;Values&gt;
              &lt;C22O01_A_TempFZ1_Set Item="A_TempFZ1_Set" Type="4" Hex="42700000" Value="60"/&gt;
              &lt;C13O02_A_TempHZ2_Set Item="A_TempHZ2_Set" Type="4" Hex="43430000" Value="195"/&gt;
              &lt;C13O03_A_TempHZ3_Set Item="A_TempHZ3_Set" Type="4" Hex="43430000" Value="195"/&gt;
          &lt;/Values&gt;
      &lt;/EX_Extrusion&gt;
  &lt;/VWSRecipeFile&gt;
  </code></pre>
  
  <p>Expected CSV Format</p>
  
  <p>A_TempFZ1_Set,A_TempHZ2_Set,A_TempHZ3_Set</p>
  
  <p>60,195,195</p>
  
  <p>i can achieve the new expected csv format, but don't know if it is the best way to do it, any suggestion is appreciated</p>
  
  <p>'</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
      &lt;xsl:output method="text" indent="no"/&gt;
  
      &lt;xsl:template match="/VWSRecipeFile"&gt;
  
        &lt;xsl:for-each select="EX_Extrusion/Values/*"&gt;
          &lt;xsl:value-of select="concat(@Item,',')" /&gt;
        &lt;/xsl:for-each&gt;
  
        &lt;xsl:text&gt;&amp;#xA;&lt;/xsl:text&gt;
  
        &lt;xsl:for-each select="EX_Extrusion/Values/*"&gt;
          &lt;xsl:value-of select="concat(@Value,',')" /&gt;
        &lt;/xsl:for-each&gt;
  
        &lt;xsl:text&gt;&amp;#xA;&lt;/xsl:text&gt;
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;'
  </code></pre>
  
  <p>Thanks</p>