iterfind()
iterates over all Elements that match the path expression
findall()
returns a list of matching Elements
find()
efficiently returns only the first match
findtext()
returns the .text content of the first match
Illustrative Examples:
>>> root = etree.XML("<root><a x='123'>aText<b/><c/><b/></a></root>")
#Find a child of an Element:
>>> print(root.find("b"))
None
>>> print(root.find("a").tag)
a
#Find an Element anywhere in the tree:
>>> print(root.find(".//b").tag)
b
>>> [ b.tag for b in root.iterfind(".//b") ]
['b', 'b']
#Find Elements with a certain attribute:
>>> print(root.findall(".//a[@x]")[0].tag)
a
>>> print(root.findall(".//a[@y]"))
[]
Reference:
http://lxml.de/tutorial.html#elementpath
(This answer is relevant selective selection from the content at this link)