In my app app i have to parsing a xml file downloaded from internet. How to download this xml and save in documents on iphone ? and then how can i start the parsing of XML s
Download the contents to an NSData object when it's loaded for the first time. Save it to disk using either one of
– writeToFile:atomically:
– writeToFile:options:error:
Which are described in the NSData class reference here: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/Reference/Reference.html#//apple_ref/occ/instm/NSData/writeToFile:atomically:
When you want to load it from disk, use [NSData dataWithContentsOfFile:] to load it into an NSData object again.
As for parsing NSData into XML, look into other answers to this very, very common question, e.g. How do I parse an NSString containing XML in Objective-C?