使用xpath的通配符

时间:2012-07-25 07:42:26

标签: xpath

我在使用xpath选择以下标记时遇到问题:

<div class="table-row">
<div class="table-row ">

我尝试过:

"//div[@class='table-row*']"

但这与上述任何一项都不相符。

我做错了什么?谢谢你的帮助。

1 个答案:

答案 0 :(得分:1)

使用starts-with匹配通配符 '*'

//div[starts-with(@class, 'table-row')]
相关问题