The XML parser never crashes for me, but my handlers have crashed on occasion. For example if I get < foo /> and try to store the value of it in an array (nil, boom). The following is the exact code I use, which parses XML using a delegate that I've made.
NSData *data = [[NSData alloc] initWithContentsOfFile:filename];
NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithData:data];
MGXMLParser *parser = [[MGXMLParser alloc] initWithRecipient:self];
[xmlParser setDelegate:parser];
BOOL success = [xmlParser parse];
if (success) {
NSLog(@"No errors");
} else {
NSError *error = [xmlParser parserError];
NSLog(@"Errors with xmlParser: %@", [error localizedDescription]);
}
[parser release];
[xmlParser release];
[data release];
MGXMLParser is my own class which is a delegate for the XML parser, in case it wasn't obvious.
Update: oops, SO parsed my < foo/ > into nothingness.