I'm using Element parser to parse some xml from a local file right now but I'm wanting to be able to retrive this xml file from the web and then parse it with Element Parser. However, my app crashes when I try to use NSURL to get the xml file. So far the code I was trying to use was:
NSURL *url = [[NSURL alloc] initWithString:@"http://example.com/file.xml"]
The code I use for retrieving the local xml file is:
NSString* path = [[NSBundle mainBundle] pathForResource: @"file" ofType: @"xml"];
NSStringEncoding encoding;
self.source = [NSString stringWithContentsOfFile: path usedEncoding: &encoding error: NULL];
DocumentRoot *document = [Element parseXML:source];
So how can this be done? I also tried to do parseXMLFromURL but it doesn't work so I'm lost. Any help would be much appreciated. Thanks