Bad access while parsing with NSXMLParser
I use following code for parsing:
//init parser with readStr
NSData* xmlData = [stringToParse dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES];
开发者_Python百科 NSXMLParser* xmlParser = [[NSXMLParser alloc] initWithData:xmlData];
//parse with events
[xmlParser setDelegate:self];
[xmlParser parse];//<<<< BAD ACCESS!!
//release parser
[xmlParser release];
I get a "EXC_BAD_ACCESS" at the line [xmlParser parse];. What am I doing wrong?
Everything is ok with this code. It seems the problem was elsewhere. Sorry for that.
精彩评论