Here is a subset of the code using the Yahoo! XML part Answers I wrote this to write my own answer app.
NSString *question = @"Who won the 1975 World Series?"; NSString *address = @"http://answers.yahooapis.com/AnswersService/V1/questionSearch?appid=iQuestion&query="; NSString *request = [NSString stringWithFormat:@"%@%@",address,question]; NSURL *URL = [NSURL URLWithString:request]; NSError *error; NSString *XML = [NSString stringWithContentsOfURL:URL encoding:NSASCIIStringEncoding error:&error];
Extraction of XML is very rude, and if you would be better off using XMLParser or XMLDocument as opposed to doing String extrapolation. It's a kind of ghetto
source share