以下是代码:
<div id="content">
<div class="datebar">
<span style="float:right">some text1</span>
<b>some text2</b>
Thursday, September 8, 2011 - 1:17 pm EDT
</div>
</div>
我只想提取日期和时间Thursday, September 8, 2011 - 1:17 pm EDT
有什么建议?感谢。
答案 0 :(得分:2)
div[@id = 'content']/div[@class = 'datebar']/text()
或
div[@id = 'content']/div[@class = 'datebar']/b/following-sibling::text()
虽然它应该在之后正常化。