iPhone sdk 中使用的 XML 解析器
我对 iPhone 开发还很陌生。我正在阅读有关使用 NSXMLParser 的 XML 解析的教程。我们是否可以使用其他解析器来解析 XML。我们如何决定使用哪个解析器?
问候,
石头
I am quite new to iphone development. I was going through tutorials on XML parsing for which NSXMLParser is used. Are there other parsers we can use for parsing XML. How do we decide which parser to use?
Regards,
Stone
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
标准解析器是 NSXMLParser 或基于 C 的 libxml。但是有很多可用的第三方解析器。查看此博客文章< /a> 其中一些最流行的解析器进行了审查和比较。
Standard parsers are NSXMLParser or c-based libxml. But there is plenty of 3rd party parsers available. Check this blog post where some of the most popular parsers reviewed and compared.
希望有帮助
hope it helps
这是来自 Apple 的示例代码。它显示了所有可用 XML 解析器之间的差异。
http://developer.apple.com/library/ios/#samplecode/XMLPerformance/Introduction/Intro.html
对于新手来说,这将是非常有帮助的..随意使用它。 。
This is a sample code from Apple.. It shows the difference between All XML parsers available..
http://developer.apple.com/library/ios/#samplecode/XMLPerformance/Introduction/Intro.html
For a newbie it will be real helpfull..Feel free to use it..
我发现很多关于这个问题的教程和帖子。
很多教程都不起作用!!!!
我找到了这个
http://gigaom.com/apple/tutorial- build-a-simple-rss-reader-for-iphone/
我不明白 NSXMLparser 是如何工作的
I find many tutorial and many post on this problem.
There are many tutorial that don't works!!!!!
I found this
http://gigaom.com/apple/tutorial-build-a-simple-rss-reader-for-iphone/
and i undstend how NSXMLparser work
就我个人而言,如果您使用 XML 并且可以访问提要,我总是会将提要转换为 plist 格式。这是一种更适合 iPhone 使用的格式,可以节省您大量的时间和精力。
还有 https://github.com/robbiehanson/KissXML 可以为您提供与缺失类似的妆容NSXML 类。它的完成方式意味着如果苹果真的将这些类放入 iOS sdk 中,它根本不会发生冲突。
Personally if you're using XML and have access to the feed I would always convert the feed into plist format. This is a much better format to use with the iPhone and will save you huge amounts of time and effort.
There is also https://github.com/robbiehanson/KissXML which gives you a similar makeup to the missing NSXML classes. Its done in a way that means that if apple ever do put those classes into the iOS sdk it won't conflict at all.
如果您打算使用 HTML,hpple 值得尝试。它非常容易使用,并且很快就会支持完整的 XML。
If you're going to use HTML, hpple is worth trying. It's very easy to use and is going to support full XML soon.
检查此链接以进行解析 xml 解析
单击此链接
XML 演示代码
Check this link for parse xml parse
Click on this link
Demo code of XML