iPhone - Can we parse .plist(xml) file using NSXMLParser? [duplicate]

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 13:07:38

问题


Possible Duplicate:
Parsing XML in Cocoa

iPhone - Can we parse .plist(xml) file using NSXMLParser?


回答1:


You can absolutely use the NSXMLParser to parse an xml plist file. However, it is much, much, much, easier to simply use the NSPropertyListSerialization class to do that.




回答2:


There are simpler ways of reading a plist file. You can use the following method for NSDictionary and NSArray:

- (id)initWithContentsOfFile:(NSString *)aPath


来源:https://stackoverflow.com/questions/2207404/iphone-can-we-parse-plistxml-file-using-nsxmlparser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!