s = """<root>
    <element>A</element>
    <element><sub>A</sub></element>
</root>"""
found = [element for element in e.getiterator() if element.text == 'A']
for f in found:
    pass
Найти элемент по тексту с помощью XPath в ElementTree