I am trying to find all tables under my current node , not including nested tables. In other words, if I have this, I want to find yes, not no:
<table> <tr><td> <div> <table> <tr><td> <table> ... </table> </td></tr> </table> <table> <tr><td> <table> ... </table> </td></tr> </table> </div> </td></tr> </table>
Is there an easy way to do this in XPath 1.0? (In version 2.0 it will be .//table except .//table//table , but I don't have version 2.0 as an option.)
EDIT:, the answers do not yet correspond to the idea of ββthe current context node. I donβt know how far the first layer of the table can be (and it can be different), and I also donβt know if I can be inside another table (or two or three).
Literally, I want what .//table except .//table//table in XPath 2.0 will be, but I only have XPath 1.
source share