title: Parsing XML using Python-elementree
body: <p>I am using the ElementTree library in python to parse an XML but unable to extract a field.</p>
  <p>Parsing sample XML as shown below.</p>
  <p>Here I want to check for failure and print corresponding testcase name.</p>
  <p>From the below example I need to get output as <strong>featTest and featuTest</strong></p>
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
  &lt;testsuite name=&quot;&quot; tests=&quot;5&quot; failures=&quot;1&quot; flakes=&quot;1&quot; errors=&quot;0&quot; skipped=&quot;0&quot; time=&quot;339.777&quot; hostname=&quot;localhost&quot;&gt;
    &lt;testcase name=&quot;featTest&quot; classname=&quot;test.urlOpenState.id&quot; time=&quot;25.874&quot;&gt;
      &lt;failure&gt;java.lang.RuntimeException:
      &lt;/failure&gt;
    &lt;/testcase&gt;
    &lt;testcase name=&quot;savTest&quot; classname=&quot;com.State.id&quot; time=&quot;2.886&quot; /&gt;
    &lt;testcase name=&quot;featuTest&quot; classname=&quot;test.urlte.id&quot; time=&quot;24.171&quot; flaky=&quot;true&quot;&gt;
      &lt;failure&gt;java.lang.RuntimeException:
      &lt;/failure&gt;
    &lt;/testcase&gt;
    &lt;testcase name=&quot;feaTest&quot; classname=&quot;test.urlte.id&quot; time=&quot;4.645&quot; /&gt;
    &lt;testcase name=&quot;quiest&quot; classname=&quot;test.urls.id&quot; time=&quot;9.008&quot; /&gt;
  &lt;/testsuite&gt;
  </code></pre>
  <p>link to guide or any suggestion will be helpful.</p>