I want to use a web service and grab the data from the service. I am able to send the request and receive the data but help me with parsing it. heres my code. I want to parse the XML response and store it in a array for further use
-(void)performSearch:(NSString *)searchText
{
NSString *param = [NSString stringWithFormat:@"ZIP=%@",
searchText];
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://wsf.cdyne.com/WeatherWS/Weather.asmx/GetCityForecastByZIP?%@", param]];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setRequestMethod:@"GET"];
[request addRequestHeader:@"Content-Type" value:@"application/x-www-form-urlencoded"];
NSLog(@"%@",param);
NSLog(@"%@",url);
NSLog(@"%@",request);
[request setDelegate:self];
[request startAsynchronous];
}
- (void)requestFinished:(ASIHTTPRequest *)request
{
NSData *response = [request responseData];
NSLog(@"%@",response);
help me how to parse the data and store it in array
//NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithData:response];
}