views:

33

answers:

1

I use following code for parsing:

    //init parser with readStr  
    NSData* xmlData = [stringToParse dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES];
    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?

A: 

Everything is ok with this code. It seems the problem was elsewhere. Sorry for that.

dkk