你的位置:首页 > 操作系统

[操作系统]Gdata XML解析配置和简单使用


首先找一个

#define HTTP_URL_GET @"http://lab.hudong.com/ipad/zutujingxuan.

- (void)getRequest {  AFHTTPRequestOperationManager *manager = [[AFHTTPRequestOperationManager alloc]                       init];  //返回数据解析  manager.responseSerializer = [AFHTTPResponseSerializer serializer];  //AFJSONResponseSerializer responseObject就是jeson解析后的对象(有可能是字典)  //AF//AFHTTPRequestOperationManager responseObject就是NSData    [manager GET:HTTP_URL_GET parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {    NSLog(@"%@",responseObject);//    NS    [self ^(AFHTTPRequestOperation *operation, NSError *error) {    NSLog(@"error:%@.",error.localizedDescription);  }];  }

先打开火狐浏览器看


最后是用一个全局的NSMutableArray接收打印,~