xpath: how to get all rows from second table column?
I have a tabl开发者_如何学Ce with multiple rows and columns.
How to find all rows from second column using xpath?
Use:
ExprToTheTable/tr/td[2] | ExprToTheTable/tbody/tr/td[2]
This selects any td
child of either any tr
or any tbody
child of the table
, identified by the expression ExprToTheTable
.
I guess you mean all values from the second column?
//table/tr/td[position()=2]
精彩评论