XPath to find nearest ancestor element that contains an element that has an attribute with a certain value
Asked 2010-06-09T11:32:02.867
57
ancestor::foo[bar[@attr="val"]]
I thought this would work, but it's not. I need to find the nearest foo element going up in the tree that has a bar child element, which in turn has an attr attribute of val.