I have problem with parsing html. I wanted to retrieve all the tables from this website http://www.zmksstalowawola.pl/taranhtml/linie_r.htm and get second cell of each received table. Here is my code that I wrote to get this effect. To check if code is working I added TextView to display received cells.
Document document = Jsoup.connect("http://www.zmksstalowawola.pl/taranhtml/linie_r.htm").get();
TextView tv = (TextView)findViewById(R.id.htmlView);
ArrayList<String> arrayList = new ArrayList<String>();
Elements tables = document.select("table");
for (Element table : tables) {
String rowData = table.select("td").get(1).toString();
arrayList.add(rowData);
tv.setText(rowData);
}
The problem is that the TextView does not display any text from cell (only text that I've write in xml activity file). I was looking for answers in many websites tutorials and it should working. I have set INTERNET permission so it's not the point. I also have all the required libraries. If anyone knows why it does not work, I would be grateful for your help. Sorry for my poor language