I need to query a node to determine if it has a parent node that contains a specified attribute. For instance:
<a b="value">
<b/>
</a>
From b as my focus element, I'd like to execute an XPath query:
..[@b]
that would return element a. The returned element must be the parent node of a, and should not contain any of a's siblings.
The lxml.etree library states that this is an invalid XPath expression.