Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- UserAgent userAgent = new UserAgent();
- userAgent.openContent("<html><body>Minha Página: <div><b>Veja as minhas fotos.</b></div></body></html>");
- Element body = userAgent.doc.findFirst("<body>");
- System.out.println("Texto do body: " + body.getChildText()); // apenas os textos do body
- System.out.println("Todos os Textos do body: " + body.innerText()); // junta todos os textos do body
- } catch(JauntException e) {
- System.err.println(e);
- }
Add Comment
Please, Sign In to add comment