How would I accomplish the nextsibling
and is there an easier way of doing
this?
You may use:
tr/td[@class="name"]/following-sibling::td
but I’d rather use directly:
tr[td[@class="name"] ='Brand']/td[@class="desc"]
This assumes that:
-
The context node, against which the XPath expression is evaluated is the parent of all
tr
elements — not shown in your question. -
Each
tr
element has only onetd
withclass
attribute valued'name'
and only onetd
withclass
attribute valued'desc'
.