I've one plist file and I want to parse it and copy it's content into NSArray,and code that I am using for that is. 

```
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);

NSString *documentsPath = [paths objectAtIndex:0];

NSString *fooPath = [documentsPath stringByAppendingPathComponent:@"myfirstplist.plist"];
NSLog(fooPath);
self.myArray = [[NSArray arrayWithContentsOfFile:fooPath] retain];
NSLog(@"%@",myArray);

```

Now problem is very weird, sometime when I print myArray content it prints file data, and sometime it doesn't.

I am facing a same problem even when I use URL as my path.

```
self.myArray = [[NSArray arrayWithContentsOfURL:URlPath] retain];

```

what would be the reason?

Thanks in advance.