Load XML from documents directory - iPhone
<p>Instead of loading a XML from the URL, I would like to load it from the documents directory(which i saved when there is Internet connection) </p>

<pre><code>NSString* filename=@"magzine.xml";
NSData *data=[NSData dataWithContentsOfURL:[[NSURL alloc] initWithString:[URLlink stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
NSString *applicationDocumentsDir =[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
NSString *storePath = [applicationDocumentsDir stringByAppendingPathComponent:filename];
[data writeToFile:storePath atomically:YES];
NSLog(@"URL: %@",url);
xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url];
//xmlParser = [[NSXMLParser alloc] initWithContentsOfFile:filename];

[xmlParser setDelegate:self];
[xmlParser parse];
</code></pre>

<p>Now i am getting the xml from url ,that is from initwithcontentsofurl,Now i  want to get the saved file from documents directory when there is no internet connection.Please help me in this ,how to load the xml??
THANKS IN ADVANCE</p>
