Custom Xpath functions on Python Etree