我收到警告::不兼容的指针类型从下面的代码中的“NSData”分配给“NSMutableData”
-(void) connectionDidFinishLoading:(NSURLConnection *) connection
{
NSLog(@"DONE. Received Bytes: %d", [webData length]);
NSString *theXML = [[[NSString alloc] initWithBytes: [webData mutableBytes] length [webData length] encoding:NSUTF8StringEncoding] autorelease];
theXML = [theXML stringByReplacingOccurrencesOfString:@"<" withString:@"<"];
theXML = [theXML stringByReplacingOccurrencesOfString:@">" withString:@">"];
NSLog(@"%@",theXML);
if( xmlParser )
{
xmlParser = nil;
[xmlParser release];
}
NSMutableString *str = [[NSMutableString alloc]initWithString:theXML];
webData = [str dataUsingEncoding:NSUTF16StringEncoding];//WARNING
xmlParser = [[[NSXMLParser alloc] initWithData:webData] autorelease];
[xmlParser setDelegate:self];
[xmlParser setShouldResolveExternalEntities: YES];
[xmlParser parse];
[connection release];
}