Human: How do I match contents of an element in XPath (lxml)? Assistant: 
Here is some code to match contents of an element to 'Example' in xpath (lxml)

tree.xpath(".//a[text()='Example']")[0].tag

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.