How to select a node using XPath if sibling node has a specific value?

Not sure why everybody is querying for siblings, you can also check for <bb/>-elements matching the predicate from <a/>‘s predicate:

//a[bb/text() = "zz"]/cc/text()

Leave a Comment