0

我尝试从下面的 div 标签中提取每个 text() ,但在 a 标签之间没有 text() 。

我用这个没有成功:

//div[@class="availability"]/*[not(self::a)]/text()

这是html

<div class="availability">
   Available. Delivered from UK <br><a href="test.com">Click for more</a>
</div>

<div class="availability">
   Available. Delivered from HK <br><a href="test.com">Click for more</a>
</div>

<div class="availability">
   Available. Delivered from USA <br><a href="test.com">Click for more</a>
</div>

<div class="availability">
   Available. Delivered from DE <br><a href="test.com">Click for more</a>
</div>

感谢您引导我走向正确的方向!

4

1 回答 1

1

//div[@class="availability"]/text()

于 2013-03-28T14:27:48.607 回答