Been lurking here for a long time, but I needed to ask this. Please excuse my noobity.
Doing some PHP/Xpath coding for some scraping, and I want to know an XPath expression to select nodes which have a parent whose sibling, somewhere in their descendant tree, contain a node with a particular text value.
Say the node is something like span[@ng="league"] and the text value somewhere in a descendant is 'SKT', I believe it should in some way include contains(text(), 'SKT'), but I'm not quite sure on the rest. TIA.
Edit:
I've tried to create a diagram of the situation here
**
|
|
+[parent]
| |
| |
| [the node I want]
|
|
|
|
+[sibling of "parent" node seen above]
| |
| *
| |
| +---[specific text, found with previous xpath query]
|
etc**