views:

429

answers:

1

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

I found the class NSXMLDocument, http://developer.apple.com/mac/library/documentation/cocoa/reference/foundation/Classes/NSXMLDocument_Class/Reference/Reference.html

But I haven't been able to import it to my project.

Is this class not available for IPhone/IPad development?

Is there some other approach I can consider?

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

+2  A: 

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.

Note that KissXML supports writing XML.

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

Paul Lynch
Since I need to modify the xml, what would be my best choice?NSXMLParser is read-only, so it doesn't countI read at one forum that TouchXML has read-write support, but I haven't found a way to write to my xml yet, and while I was looking I saw in another forum that TouchXML is just for reading, and doesn't support writting, I'm very confused about it.Any ideas? Thanks