Jsoup library ,trying to make an Android app which reads data from HTML site
<p>I am facing with an problem which i couldnt fix it for whole day :S,
btw the problem is when I try to parse an html site and if there are data in that html site it works fine, but when there is no data that time it hangs and shows me an error in my LogCat where it says NullPointer, for ex: here we have two links one which has data and the other one which doesnt have data:</p>

<p>1st link: <a href="http://wap.nastabuss.se/its4wap/QueryForm.aspx?hpl=Resecentrum+(V%C3%A4xj%C3%B6" rel="nofollow">http://wap.nastabuss.se/its4wap/QueryForm.aspx?hpl=Resecentrum+(V%C3%A4xj%C3%B6</a>)
2nd link: <a href="http://wap.nastabuss.se/its4wap/QueryForm.aspx?hpl=Ulfsn%C3%A4s+(Hallands+l%C3%A4n" rel="nofollow">http://wap.nastabuss.se/its4wap/QueryForm.aspx?hpl=Ulfsn%C3%A4s+(Hallands+l%C3%A4n</a>)</p>

<p>So the error shows here in case when i try to display data from the 2nd link which is empty.</p>

<pre><code>        Element table = doc.select("table[class=tableMenuCell]").first();
    Iterator&lt;Element&gt; ite = table.select("td[align=right]").iterator();
    Iterator&lt;Element&gt; destinacions = table.select("td[align=left]").iterator();
</code></pre>

<p>and the rest of code after these lines is just while statement and i add the data in arraylist which works fine when there is data on that link.</p>

<p>At the midle line code ate "ite" line is showing the error.</p>

<p>So how can I make any if statement or smth which checks if there is no data at all in that site to not check and just to dipslay some msgbox that there is no data.</p>

<p>Thanx,
I would really appreciate if someone can help me this case.</p>
