Hi, i need help. I have some method where xml file is being loaded from url.
Code:
- (id) loadXMLByURL:(NSString *)urlString{
NSURL *url = [NSURL URLWithString:urlString];
//NSXMLParser *parser
parser = [[NSXMLParser alloc] initWithContentsOfURL:url];
parser.delegate = self;
[parser parse];
return self;
}
It works fine. But i want to have ability to handle connection errors(for example if connection is torn or there is not needed file).
How can i do it? Any examples of code, thoughts and references would be appreciated.
Michael