Reputation: 9023
how to parse HTML tag in android, file is stored in my local drive
Upvotes: 0
Views: 564
Reputation: 1108642
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");
// ...
}
Upvotes: 1