开发者

xpath: how to get all rows from second table column?

开发者 https://www.devze.com 2023-04-05 09:34 出处:网络
I have a tabl开发者_如何学Ce with multiple rows and columns. How to find all rows from second column using xpath?Use:

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]
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号