从Yahoo Weather解析XML代码

时间:2013-07-29 16:39:18

标签: ios objective-c

我想从以下链接解析XML数据:

http://weather.yahooapis.com/forecastrss?w=12776781&u=f

我想从以下行中获取文本,代码和temp:

<yweather:condition text="Light Rain" code="11" temp="78" date="Fri, 26 Jul 2013 1:55 pm EDT" />

我目前正在使用此代码,但无法弄清楚如何修改此代码以检索上述值。

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
    cell.textLabel.text = [[feeds objectAtIndex:indexPath.row] objectForKey: @"title"];
    return cell;
}

0 个答案:

没有答案