你如何在android中解析HTML? [英] How can you parse HTML in android?
问题描述
我正在为 android 开发一个应用程序,该应用程序的一个功能元素是从图书馆目录的在线搜索中返回结果.应用程序需要以与应用程序其余部分保持一致的方式显示通过自定义 HTML 表单执行的搜索结果.即,需要解析搜索结果并显示有用的元素.我只是想知道是否/如何在 android 中实现这一点?
I am making an application for android, and an element of the functionality of the application is to return results from an online search of a library's catalogue. The application needs to display the results of the search, which is carried out by way of a custom HTML form, in a manner in keeping with the rest of the application. Ie, the results of the search need to be parsed and the useful elements displayed. I was just wondering if/how this could be achieved in android?
推荐答案
您可以使用 XmlPullParser 来解析 XML.
You can use XmlPullParser for parsing XML.
例如参考 http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html
这篇关于你如何在android中解析HTML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!