title: How to write all the SOAP response values into CSV file with delimiter in Groovy for SoapUI
body: <p>I am new to Groovy and working on Soap UI. Currently I am working on Groovy module, where I need to write the all tag values with delimiter on to <code>.csv</code> file. The solution I got from other post is specific to <code>xpath</code>. </p>
  
  <p>But am trying to achieve the below:</p>
  
  <ol>
  <li>all the values of all the repetitive arrays to be stored in csv file</li>
  <li>each array in single row with delimiter</li>
  </ol>
  
  <p><strong>Expected Output:</strong></p>
  
  <pre><code>code;Name;Category;Manufacturer;Price;Stock // as header
  1234;product name;some category;manufacturer;100;1
  1235;product name2;some category2;manufacturer2;1002;2
  </code></pre>
  
  <p>XML sample:</p>
  
  <pre><code>&lt;ns2:personalarray1Response&gt;
      &lt;ns2:personarray1&gt;
          &lt;Code&gt;1234&lt;/Code&gt;
          &lt;Name&gt;product name&lt;/Name&gt;
          &lt;Category&gt;some category&lt;/Category&gt;
          &lt;Manufacturer&gt;manufacturer&lt;/Manufacturer&gt;
          &lt;Price&gt;100&lt;/Price&gt;
          &lt;Stock&gt;1&lt;/Stock&gt;
      &lt;/ns2:personarray1&gt;
      &lt;ns2:personarray1&gt;
          &lt;Code&gt;1235&lt;/Code&gt;
          &lt;Name&gt;product name2&lt;/Name&gt;
          &lt;Category&gt;some category2&lt;/Category&gt;
          &lt;Manufacturer&gt;manufacturer2&lt;/Manufacturer&gt;
          &lt;Price&gt;1002&lt;/Price&gt;
          &lt;Stock&gt;2&lt;/Stock&gt;
      &lt;/ns2:personarray1&gt;
      &lt;ns2:personarray1&gt;
          &lt;Code&gt;1234&lt;/Code&gt;
          &lt;Name&gt;product name&lt;/Name&gt;
          &lt;Category&gt;some category&lt;/Category&gt;
          &lt;Manufacturer&gt;manufacturer&lt;/Manufacturer&gt;
          &lt;Price&gt;100&lt;/Price&gt;
          &lt;Stock&gt;1&lt;/Stock&gt;
      &lt;/ns2:personalarray1&gt;
  &lt;/ns2:personalarray1Response&gt;
  </code></pre>