Example how to access HTML elements in Java.
HTML Code
http://woppr.de/html
<html> <head> <title>My HTML page</title> </head> <body> <div id="1"> <h1>Inhalt div 1</h1> </div> <div id="2"> <h1>Inhalt div 2</h1> </div> </body> </html> |
Eclipse
Code
Source
http://jsoup.org/cookbook/extracting-data/dom-navigation
Source Code (git)