REST API - 在 Android 上使用 Java 进行 XML 解析
我是 Android 开发新手。
对于我的项目,我需要使用“REST API”输出 XML。在 Android 的 Java 中使用它的最佳方式是什么?
任何人都可以提供一些带有示例的选项吗?
I am new to Android Development.
For my project, I need to use "REST APIs" outputting XML. What will be the best way of using that in Java for Android?
Can anyone provide some options with examples?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最好的库是 Simple XML:http://simple.sourceforge.net/ 看一下示例...它将允许您轻松地从简单对象解析和生成 XML。
会有其他人推荐您使用 Android SDK 中的 SAX 或 XmlPullParser;然而,我开发了许多使用 XML REST API 的应用程序,我发现 SimpleXml 使我的工作效率提高了 200%。
The best library out there is Simple XML: http://simple.sourceforge.net/ Take a look at the examples... it will allow you to easily parse and generate XML from simple objects.
There will be others that recommend you to use SAX or XmlPullParser which comes in the Android SDK; however, I have developed many apps that uses XML REST APIs, and what I found is that SimpleXml makes me like 200% more productive.