Given the following html:
<html>
<body>
<div>
<p>During the interim there shall be nourishment supplied</p>
</div>
<div>
<a href="/interim">In the interim</a>
</div>
</body>
</html>
and the following xpath:
//*[contains(.,'interim')]
The elements returned by this include the HTML tag, the BODY tag, etc. So every ancestor parent is returned.
I only want the immediate container nodes, i.e. the P and the A.
During the interim there shall be nourishment supplied