Regarding xml parsing in iphone
- by Prash.......
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];
                                        }
                                    }