Here is my XML code, what I would like to do is check that within the <testcase> element there is the <failure> element with an if to put conditions.
<testsuites disabled="0" errors="0" failures="1" tests="20" time="102.012">
<testsuite name="name1" timestamp="2021-01-27T10:20:51" hostname="localhost" time="79.312" errors="0" tests="12" skipped="1" disabled="0" failures="1">
<testcase classname="nametescase" name="STEP_1: Date filter" time="3.776">
<failure></failure>
</testcase>
</testsuite>
</testsuites>
How can I do this condition in nodejs?