I have the following XML.
<?xml version="1.0" encoding="UTF-8"?><testsuites tests="10" failures="0" disabled="0" errors="0" time="0.001" name="AllTests"><testsuite name="TestOne" tests="5" failures="0" disabled="0" errors="0" time="0.001"><testcase name="DefaultConstructor" status="run" time="0" classname="TestOne" /><testcase name="DefaultDestructor" status="run" time="0" classname="TestOne" /><testcase name="VHDL_EMIT_Passthrough" status="run" time="0" classname="TestOne" /><testcase name="VHDL_BUILD_Passthrough" status="run" time="0" classname="TestOne" /><testcase name="VHDL_SIMULATE_Passthrough" status="run" time="0.001" classname="TestOne" /></testsuite></testsuites>
Q : How can I find the node <testcase name="VHDL_BUILD_Passthrough" status="run" time="0" classname="TestOne" />
? I find the function tree.find()
, but the parameter to this function seems element name.
I need to find the node based on attribute : name = "VHDL_BUILD_Passthrough" AND classname="TestOne"
.