开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜