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");
// ...
}
精彩评论