Selecting a particular tag using Jsoup -


<table class="striped"> <tbody>      <tr><td><img src="images/google.png"/>&nbsp;google indexed pages</td><td class="right">613000000</td></tr>     <tr><td><img src="images/dmoz.png"/>&nbsp;dmoz directory listed</td><td class="right">yes</td></tr>     <tr><td><img src="images/pagerank.png"/>&nbsp;google page rank</td><td class="right">9/10</td></tr>  </tbody> </table> 

i want extract google rank value i.e 9/10 using jsoup.

this code have written till now

element tbody = doc.select("tbody>tr>td>img[src=images/pagerank.png]").first(); 

how move next tag after ?

what mean move next tag? next google page rank tag?

the select method of document tag returns elements object implementation of list. iterate throught next elements. if want element use doc.select again.

for (element e : doc.select("tbody>tr>td>img[src=images/pagerank.png]")) {     //your code. } 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -