开发者

android HTML parsing

how to par开发者_StackOverflow社区se HTML tag in android, file is stored in my local drive


Use Jsoup. It supports selecting elements using CSS selectors. Start with this cookbook introduction.

Kickoff example:

Document document = Jsoup.parse(new File("/foo.html"), "UTF-8");
Elements links = document.select("a");
for (Element link : links) {
    String url = link.absUrl("href");
    // ...
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜