从iOS的URL解析XML的最佳方法是什么? [英] What's the best way to parse XML from a URL for iOS?

查看:73
本文介绍了从iOS的URL解析XML的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找在iOS上解析XML的最佳方法.似乎有很多方法可以做到这一点,有许多不同的例子.具体来说,我想向天气服务发送请求,然后从XML响应中提取天气.

I'm looking for the best way to parse XML on iOS. There seem to be SO many ways to do this, so many different examples. Specifically, I want to send a request to a weather service, then extract the weather from the XML response.

如果您可以为我指明正确的方向,并希望其他人也能对此有所帮助.

If you could point me in the right direction and hopefully someone else will also find this useful.

推荐答案

如果xml文档很小到中等大小,那么NSXMLParser是最好的选择:

If the xml document is small to medium sized, then NSXMLParser is the way to go: NSXMLParser

这篇关于从iOS的URL解析XML的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆