Jsoup to get data on <b> block

Posted by Poh Sun on Stack Overflow See other posts from Stack Overflow or by Poh Sun
Published on 2013-10-23T14:42:58Z Indexed on 2013/10/23 15:54 UTC
Read the original article Hit count: 192

Filed under:
|
|
|

I'm new to JSoup on Java and would like to enquire few questions. Given the HTML code of the page I would like to get is this

<td width="70%" class="row1">
<b>4</b>
<br />( 0 posts per day / 0.00% of total forum posts )
</td>

My question here is I want to get the data 4 but the output I get is 4 ( 0 posts per day / 0.00% of total forum posts )

Here is my Java code

Iterator <Element> element = totalPost.select("td[width=70%][class=row1]").iterator();

System.out.println(element.next().text());

Sorry if my question is not clear enough.

© Stack Overflow or respective owner

Related posts about java

Related posts about html