customizing writeToFile in objectiveC
I'm interested in customizing the writeToFile meth开发者_运维问答od so that I can generate an XML document with a particular schema.
Is there an accepted/recommended way of doing this?
Any and all pointers are appreciated!
It sounds like you are interested in general file I/O, in which case you might be interested in a link like this. You will not likely be "customizing" writeToFile, since the way you assemble XML data will probably be with NSString or NSData on an iPhone, which already have the I/O methods you need.
If you don't mind being abstracted away from the actual bits and bytes of I/O, you could try a third party XML package like this, which can write out an XML document, once you have specified it using the API.
The comment by lef2 is for Mac, not for iPhone.
精彩评论