First, make sure <uses-permission android:name="android.permission.INTERNET" />
is in your AndroidManifest.xml
.
I don't see why something like this wouldn't work.
URLConnection connect = someUrl.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(connect.getInputStream()));
ArrayList<String> inputLine = new ArrayList<String>();
String tempString;
while ((tempString = in.readLine()) != null) {
inputLine.add(tempString);
}
in.close();
for (String s : inputLine) {
// do stuff
}
The // do stuff
could be something using String.substring
or String.replace
in conjunction with String.startsWith
, or whatever else you want to use to parse the HTML.
You will need to add in exception catching, I could be wrong but I think the only exceptions you have to worry about here is IOException.