...It is unique in that it combines the speed and XML feature completeness of these libraries with the simplicity of a native Python API, mostly compatible but superior to the well-known ElementTree API. The latest release works with all CPython versions from 3.6 to 3.12. See the introduction for more information about the background and goals of the lxml project.
This is a pure-Python XPath evaluator based on ElementTree. It supports a substantial fraction of the XPath 1.0 specification, but only the self, child, and attribute axes. The parser underlying the evaluator attempts to handle all of XPath 1.0.