title: Parse XML in Jenkins Pipeline - No such property: testsuite for class: groovy.lang.Binding
body: <p>I am using <code>XMLParse</code> to parse XML in Jenkins Pipeline.</p>
  
  <pre><code>&lt;testsuites name="Mocha Tests"&gt;
    &lt;testsuite name="Customer Personal Informations Retrieving personal information data Valid params" tests="1" errors="0" failures="0" skipped="0" timestamp="2019-08-30T20:37:26" time="0.422"&gt;
      &lt;testcase classname="Customer Personal Informations Retrieving personal information data Valid params" name="When try to get all personal information data, then it should the fields" time="0.157"&gt;
      &lt;/testcase&gt;
    &lt;/testsuite&gt;
    &lt;testsuite name="Customer Personal Informations Retrieving personal information data Invalid params" tests="2" errors="0" failures="0" skipped="0" timestamp="2019-08-30T20:37:26" time="0.261"&gt;
      &lt;testcase classname="Customer Personal Informations Retrieving personal information data Invalid params" name="When get personal informations without valid token, then it shouldnt return fields" time="0.009"&gt;
      &lt;/testcase&gt;
    &lt;/testsuite&gt;
  &lt;/testsuites&gt;
  </code></pre>
  
  <p>I want to know if there are any errors in any of the <code>testsuite</code> field.</p>
  
  <p>For that, I am using and getting <code>groovy.lang.MissingPropertyException: No such property: testsuite for class: groovy.lang.Binding</code> error.</p>
  
  <pre><code>def test_report = readFile "report.xml"
  def xml = new XmlParser()
  def test_report_xml = xml.parseText(test_report)
  
  test_report_xml.each{
      echo testsuite.@errors
  }
  </code></pre>