以下是html代码:
<div class="grid1-4">
<a class="largeButton javascript sponsorProject button orangeGrad" href="javascript:;">
<div class="button">
<div class="button progress">
<div class="progressWrapper">
<div class="meter">
<div class="progress" style="width:52%"> </div>
</div>
<p class="progressText">
<span>52% Raised of $20,000 Goal</span>
我想在代码的最底部提取句子 - 即52% Raised of $20,000 Goal
。
那是什么xpath表达式?我用Google搜索并搜索了一些提示,但无法从中得到很多...... :(。我甚至用firebug来查找xpath表达式但仍没有进展......
谢谢
PS:由于我的项目的性质,我不能写
//p[@class="progressText"]//span
xpath表达式HAS TO INVOLVE
<div class="grid1-4">
答案 0 :(得分:0)
此XPath:
//div[@class="grid1-4"]//text()[contains(., 'Raised of')]
<强>收率:强>
52% Raised of $20,000 Goal