I am trying to parse the html of the following URL:
http://ocw.mit.edu/courses/aeronautics-and-astronautics/16-050-thermal-energy-fall-2002/
to obtain the te
Here's a short example:
// Connect to the website and parse it into a document
Document doc = Jsoup.connect("http://ocw.mit.edu/courses/aeronautics-and-astronautics/16-050-thermal-energy-fall-2002/").get();
// Select all elements you need (se below for documentation)
Elements elements = doc.select("div[class=chpstaff] p");
// Get the text of the first element
String instructor = elements.first().text();
// eg. print the result
System.out.println(instructor);
Take a look at the documentation of the jsoup selector api here: Jsoup Codebook
Its not very difficult to use but very powerful.