HtmlParsing
Android Html Parsing — JSOUP
You can use a url to load into Documents
Document doc = Jsoup.connect(URL).get(); or use a string Document doc = Jsoup.parse(strHtml,”UTF-8");
Just add to add dependencies in setting.gradle
compile ‘org.jsoup:jsoup:1.7.3’
Then it’s very easy to find any elements by Class
Elements dispItemElements = doc.getElementsByClass(“rt-store-goods-disp-mix”)
Or by Tag
element.getElementsByClass(“vtop”).get(0).getElementsByTag(“span”).get(1).getElementsByTag(“a”).get(0).html() ;
Or by any method you want
String seller = element.getElementsByClass(“vtop”).get(0).getElementsByTag(“span”).get(1).getElementsByTag(“a”).get(0).html() ;