在 iOS 中解析 XML?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1021102/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Parsing XML in iOS?
提问by diederikh
I need to parse simple XML coming from my webserver and store this in database. How do I do the same?
我需要解析来自我的网络服务器的简单 XML 并将其存储在数据库中。我该怎么做?
回答by diederikh
回答by zpesk
Apple has two built in solutions for parsing XML data on the iphone:
Apple 有两个内置的解决方案来解析 iPhone 上的 XML 数据:
1) Apple has an objective-c implementation of an XML parser called NSXMLParser. See documentation here.
1) Apple 有一个名为 NSXMLParser 的 XML 解析器的 Objective-C 实现。 请参阅此处的文档。
2) Apple also has a C based implementation of an XML parser called libXML2. See documentation here. - scroll down to see section on XML support
2) Apple 还有一个基于 C 的 XML 解析器实现,称为 libXML2。 请参阅此处的文档。- 向下滚动以查看有关 XML 支持的部分
回答by user497293
At the end of the article you can find a full project example.
在文章的末尾,您可以找到一个完整的项目示例。
回答by ravinder521986
you can check here ,might be it will help you. http://homepages.ius.edu/rwisman/C490/html/nsxmlparser.html
你可以在这里查看,可能会对你有所帮助。 http://homepages.ius.edu/rwisman/C490/html/nsxmlparser.html
回答by Tom Bradley
Check out http://www.tbxml.co.ukfor a super-fast, lightweight, easy to use XML parser!
查看http://www.tbxml.co.uk以获得超快速、轻量级、易于使用的 XML 解析器!