doc = Jsoup.parse(html2);
Whitelist whitelist = new Whitelist();
Whitelist.simpleText().addTags("table","td", "tr","tbody");
Cleaner cleaner = new Cleaner(whitelist);
cleaner.clean(doc);
Elements gradesTableBody = doc.select(".user-grade").select("tbody").select("tr");
Log.d("output", gradesTableBody.html());
the output html still contains <img> tags etc. the cleaner does not work. What am i doing wrong?
Cleaner.cleanreturns a new document (which you currently just throw away).You need to do
Also, these lines doesn’t make sense:
I think you may want to do