Created
June 22, 2011 23:15
-
-
Save TyOverby/1041525 to your computer and use it in GitHub Desktop.
Gets all of the elements in an html table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Url input = new Url("http://what.cd/forums.php?action=viewforum&forumid=7"); | |
Document doc = Jsoup.parse(input,500);//500 is the timeout | |
Elements rowsa = content.getElementsByClass("rowa"); | |
Elements rowsb = content.getElementsByClass("rowb"); | |
Elements totalRows = rowsa+rowsb //don't know what to do here, but concatinate them if possible | |
for (Element row : totalRows) { | |
for(Element data : row.children()){ | |
System.out.println(data.text()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment