I’m currently parsing an XML file that resides in my bundle using NSXMLParser with the following line:
NSURL *xmlURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"XMLFileName" ofType:@"xml"]];
But I want to put the same file on my server instead. I can’t find an example of how to call the same file from my server. Any help is appreciated.
lq
NSURLhas several methods for creating URLs, one of which is-URLWithString:; like so:That URL can be passed directly to
NSXMLParser; but you might want to do so in a secondary thread.