lxml
Element.xpath()
To evaluate an XPath expression s using some Element instance E as the context node:
s
Element
E
E.xpath ( s )
For a general discussion of the use of XPath, see Section 9, “XPath processing”.