如何从iOS写入XML文件? [英] How to write to an XML file from iOS?

查看:367
本文介绍了如何从iOS写入XML文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为iPad开发一个应用程序,并且需要在运行时修改XML文件中的几个属性.

I am developing an app for iPad, and I need to modify several attributes in a XML file at runtime.

我找到了类 NSXMLDocument .但是我无法将其导入到我的项目中.

I found the class NSXMLDocument. But I haven't been able to import it to my project.

该类不适用于iPhone/iPad开发吗?

Is this class not available for iPhone/iPad development?

还有其他可以考虑的方法吗?

Is there some other approach I can consider?

我了解了libxml库.是我的答案还是有更好的方法?

I read about libxml library. Is it my answer or there is a better approach?

推荐答案

NSXMLDocument仅是MacOS X Cocoa.您可以在iPhone NSXMLParser上使用它,以及在libxml2-TouchXMLKissXML和其他几个库上构建的几个外部库.

NSXMLDocument is MacOS X Cocoa only. You have available on iPhone NSXMLParser, and several external libraries built on libxml2 - TouchXML, KissXML and a couple of others.

请注意, KissXML 支持编写XML.

Note that KissXML supports writing XML.

建议的其他XML库包括 Google数据 VTD-XML .

Other XML libraries that have been suggested include the XML support from Google Data and VTD-XML.

这篇关于如何从iOS写入XML文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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