开发者

Scrape data of a div after one or two html tags using xpath

Here is the code:

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

I just want to extract date and time Thursday, September 8, 2011 - 1:17 pm EDT.

Any suggestions? Thanks.


div[@id = 'content']/div[@class = 'datebar']/text()

or

div[@id = 'content']/div[@class = 'datebar']/b/following-sibling::text()

Though it should be normalized after.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜