HTML parsing in Android

♀尐吖头ヾ 提交于 2019-12-01 13:25:33

Check out the following HTML parsers. There are more out there. Maybe one will work for you:

IMO there are two easy ways to parse HTML:

  • Convert the HML to XML (XHTML) using a library (e.g. HTMLTidy) and then use an XML parser
  • Use an existing HTML parser (e.g. a standard Web browser like WebKit, ForeFox, and/or IE) and then read the "DOM" which is a more-or-less-API-friendly representation of the parsed HTML

Alternatively, if you want to write your own parser (which I doubt you should, for homework: it would be long and complicated to implement it properly/completely), see the specs for parsing HTML.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!