import com.jaunt.*; import com.jaunt.component.*; import*; public class Example3{ public static void main(String[] args){ try{ UserAgent userAgent = new UserAgent(); //open HTML from a String. userAgent.openContent("WebPage



Copyright 2013"); Element body = userAgent.doc.findFirst(""); Element div = body.findFirst("
"); System.out.println("body's text: " + body.getChildText()); //join child text of body element System.out.println("body's innerText: " + body.innerText()); //join all text within body element System.out.println("div's text: " + div.getChildText()); //join child of div element System.out.println("div's innerText: " + div.innerText()); //join all text within the div element } catch(JauntException e){ System.err.println(e); } } }