REST API - 在 Android 上使用 Java 进行 XML 解析

发布于 2024-12-18 10:15:04 字数 119 浏览 1 评论 0原文

我是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

葮薆情 2024-12-25 10:15:04

最好的库是 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文