I am using the following code and a bit more to download a html file from a website and it is then turned into a string.
URLConnection connection = javacodingURL.openConnection();
BufferedReader br = new BufferedReader(newInputStreamReader(connection.getInputStream()));
String line = "";
while ((line = br.readLine()) != null)
My code works, and I get a ouput of the html file. Though what I want is specfic text but I don't want to use the HTMLEditor from java as it causes too many problems. The html file has some code at the start which I want to ignore and it then follows a pattern:
It starts with <p align="center">............(code I need)......<hr color="#87A9DC">. Then again it starts with <p align="center">............(code I need)......<hr color="#87A9DC"> (goes on in that format till then end)
My question is how would I get the all the html code between the p align code and hr color and place the data individualy into a arraylist?
Thanks for any help