title: Html parsing with JSoup
body: <p>I am trying to parse the html of the following URL:</p>
  
  <p><a href="http://ocw.mit.edu/courses/aeronautics-and-astronautics/16-050-thermal-energy-fall-2002/" rel="nofollow">http://ocw.mit.edu/courses/aeronautics-and-astronautics/16-050-thermal-energy-fall-2002/</a></p>
  
  <p>to obtain the text of the "&lt; p >" tag which contains the name of an instructor. The required information is located inside "&lt; p >" tags but I am unable to retrieve the tags using JSoup. I have no idea what I am doing wrong because when I save the  tag in an Element object lets call it 'b' and I call b.getAllElements() it doesn't show <p> as one of the elements. Isn't that what the getAllElements() method of Jsoup does? If not could someone please explain to me the hierarchy that I am obviously missing as the parser is not able to locate the <p> tag which contains the text that I require which in this case is "Prof. Zoltan Spakovszky".</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <pre><code>public void getHomePageLinks()
  {
      String html = "http://ocw.mit.edu/courses/aeronautics-and-astronautics/16-050-thermal-energy-fall-2002/";
      org.jsoup.nodes.Document doc = Jsoup.parse(html);
  
      Elements bodies = doc.select("body");
  
      for(Element body : bodies )
      {
          System.out.println(body.getAllElements());
      }
  
  }
  </code></pre>
  
  <p>the output is:</p>
  
  <p>
   <a href="http://ocw.mit.edu/courses/aeronautics-and-astronautics/16-050-thermal-energy-fall-2002/" rel="nofollow">http://ocw.mit.edu/courses/aeronautics-and-astronautics/16-050-thermal-energy-fall-2002/</a>
  </p>
  
  <p>isn't it supposed to print out all the elements within the body tag in the document?</p>