What I'm trying to accomplish read text (html) from a website that i have entered and stored in str1
. I have been able to open the website and print all of the html code inside. but what I want to do is only print words between <title><\title>
so i can print the title of the page.
URL oracle = new URL(str1);
BufferedReader in = new BufferedReader(
new InputStreamReader(oracle.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();