0

I am developing an application. In it, I want to create an XML file with some data. I want to save the XML file and retrieve it at some other time. Is it possible to save and retrieve an XML file on the iPhone? If so, how?

Ingve
  • 1,086
  • 2
  • 20
  • 39

1 Answers1

0

You could use NSUserDefaults with some NSDictionaries or NSArrays. It's basically the same stuff. NSUserDefaults writes some NSArrays or NSDictionary to the app folder on your device as an XML (Plist file).

The good thing is that it will be persistent during app lauches. Have a look here.

Cyupa
  • 1,126
  • 13
  • 37
  • Please give me the example for nsuserdefaults with nsarray or nsdictionary – Venkat Naresh Oct 28 '11 at 07:17
  • have a look here:[http://stackoverflow.com/questions/537044/storing-custom-objects-in-an-nsmutablearray-in-nsuserdefaults/537849#537849](http://stackoverflow.com/questions/537044/storing-custom-objects-in-an-nsmutablearray-in-nsuserdefaults/537849#537849) – Cyupa Oct 28 '11 at 07:27