I am trying to access a ‘local’ xml file stored within my project prior to parsing it.
However, I cannot seem to access the XML file I have created.
My code is as follows
self.fileMgr = [NSFileManager defaultManager];
//get array of paths
self.paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
//get documents directory path
self.documentsDirectory = [paths objectAtIndex:0];
self.file = [documentsDirectory stringByAppendingPathComponent:@"mylocalfile.xml"];
The file is stored in the root of the project.
Any help would be greatly appreciated
You say
But then you look for it in the Documents directory. Instead, do this:
Note that capitalization matters.