Regarding xml parsing in iphone

Posted by Prash....... on Stack Overflow See other posts from Stack Overflow or by Prash.......
Published on 2010-04-29T18:45:15Z Indexed on 2010/04/29 18:47 UTC
Read the original article Hit count: 309

Filed under:

hi...

I am developing an applictaion in which i am doing xml parsing i found an error in [xmlparse parse] method. and the error for this is as follows: [NSCFString bytes]: unrecognized selector sent to instance 0x3df6310 2010-04-30 00:09:46.302 SPCiphone2[4234:1003] void SendDelegateMessage(NSInvocation*): delegate () failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode

code snippet for this as follows.

responseOfWebResultData = [[NSMutableString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; NSLog(@"result: %@", responseOfWebResultData); //starting the XML parsing

                                    if(responseOfWebResultData)
                                    {
                                        @try
                                        {
                                        xmlParser = [[NSXMLParser alloc] initWithData:responseOfWebResultData];
                                        [xmlParser setDelegate: self];
                                        [xmlParser setShouldResolveExternalEntities: YES];
                                        [xmlParser parse];
                                        [responseOfWebResultData release];
                                        }
                                        @catch(NSException *e)
                                        {
                                            UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Please " message:[e reason] delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
                                            [alert show];
                                            [alert release];
                                        }
                                    }

© Stack Overflow or respective owner

Related posts about iphone