I've got an XHTML document, and I want to select the only table in it with class="index".
If I understand correctly, the descendant axis will select all nodes directly and indirectly descending from the current node, so here's what I've got.
//descendant::table[@class="index"]
It doesn't appear to be working when tested with xmlstarlet. Is my tool broke, or is the XPath expression wrong?
I think //table[@class="index"] is what you want
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With