Here you can find the source of convertTablesToDivs(Element body)
private static void convertTablesToDivs(Element body)
//package com.java2s; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; public class Main { private static void convertTablesToDivs(Element body) { Elements elements = body.select("table"); for (Element element : elements) { element.tagName("div"); }//ww w . j a v a 2 s .c om elements = body.select("tbody"); for (Element element : elements) { element.tagName("div"); } elements = body.select("tr"); for (Element element : elements) { element.tagName("div"); } elements = body.select("th"); for (Element element : elements) { element.tagName("p"); } elements = body.select("td"); for (Element element : elements) { element.tagName("p"); } } }