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
.
div[@id = 'content']/div[@class = 'datebar']/text()
or
div[@id = 'content']/div[@class = 'datebar']/b/following-sibling::text()
Though it should be normalized after.
精彩评论