I am trying to retrieve a parent node and it's child, where the child has a certain text.
this is my html:
<bod>
<div>
<span>something</span>
</div>
</body>
i am using the following to catch the child :
$the_child = $xpath->query('(//*[text()[contains(., "something")]])[1]');
but how do i also catch his first parent ?