Created
March 13, 2016 04:46
-
-
Save konk3r/4473416c665dd531d4f1 to your computer and use it in GitHub Desktop.
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
private void pullRows() { | |
Elements elements = html.getElementsByTag(ROW_TAG); | |
ArrayList<ArrayList<String>> rows = new ArrayList<>(); | |
elements.remove(); | |
for (Element element: elements) { | |
ArrayList<String> row = parseRow(element, CELL_TAG); | |
rows.add(row); | |
} | |
table.setRows(rows); | |
} | |
private ArrayList<String> parseRow(Element unparsedRow, String cellTag) { | |
ArrayList<String> row = new ArrayList<>(); | |
Elements cells = unparsedRow.getElementsByTag(cellTag); | |
for (Element element: cells) { | |
row.add(element.text()); | |
} | |
return row; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment