In Cocoa, you can just download it
NSURL *url = [NSURL URLWithString:urlString];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url
cachePolicy:NSURLRequestReturnCacheDataElseLoad
timeoutInterval:30];
NSData *urlData;
NSURLResponse *response;
NSError *error = nil;
urlData = [NSURLConnection sendSynchronousRequest:urlRequest
returningResponse:&response
error:&error];
and load it into NSXMLDocument
NSXMLDocument *doc = [[NSXMLDocument alloc]
initWithData:urlData options:0 error:&error];
and get nodes with
NSArray* tempArray = [doc nodesForXPath:@"something/anotherthing" error:&error];
I don’t know if it all works on the iPhone.
david source
share