You'll have to iterate through the <testcase />
elements that you have, like so:
from xml.etree import cElementTree as ET# assume xmlstr contains the xml string as above# (after being fixed and validated)testsuites = ET.fromstring(xmlstr)testsuite = testsuites.find('testsuite')for testcase in testsuite.findall('testcase'): if testcase.get('name') == 'VHDL_BUILD_Passthrough': # do what you will with `testcase`, now it is the element # with the sought-after attribute print repr(testcase)