我正在开发一个应用程序,我在做XML解析。我在[xmlparse parse]
方法中发现错误。关于iPhone中的XML解析
错误:
[NSCFString bytes]: unrecognized selector sent to instance 0x3df6310
2010-04-30 00:09:46.302 SPCiphone2[4234:1003] void SendDelegateMessage
(NSInvocation*): delegate (<CFNotificationCenter 0x3d09670 [0x87dca0]>)
failed to return after waiting 10 seconds. main run loop mode:
kCFRunLoopDefaultMode
代码片段:
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];
}
}
我们可否看到数据? – dwery 2010-04-29 18:50:17