Possible Duplicate:
Parse HTML in Android
How would you parse such data from a page?
Now some people tell me to use Json, but what if that page doesn't support json? Other people tell me convert the page to json format using Yahoo yql console, but I don't know how that works and I couldn't find tuts for it. Some other people suggest using android regex, while others don't recommend it.
Can someone show me how you would parse the following using your method.
<div id="footer-sites">
<span style="color:#FE7A15;font-size:140%">■</span> <a href="http://stackoverflow.com">stackoverflow.com</a>
<span style="color:#FE7A15;font-size:140%">■</span> <a href="http://stackapps.com">api/apps</a>
<span style="color:#FE7A15;font-size:140%">■</span> <a href="http://careers.stackoverflow.com">careers 2.0</a>
<span style="color:#E8272C;font-size:140%">■</span> <a href="http://serverfault.com">serverfault.com</a>
<span style="color:#00AFEF;font-size:140%">■</span> <a href="http://superuser.com">superuser.com</a>
</div>
For practice I want to extract the href link and the title, so the result should be like this.
Title: stackoverflow.com
Link: http://stackoverflow.com
etc ...
I did not write any code to post here for you guys, because I am still researching. That's why I am asking if someone can show me how this would work, so I can understand. Thanks!