0

我有 xml http://weather.yahooapis.com/forecastrss?w=20070458&u=c我如何从标签(这是两次或可能更多)属性日解析等等......谢谢

4

2 回答 2

0

当您在方法didEndElement方法中找到与所需元素名称相同时,获取一个 NSMutableArray 并添加对象

已编辑

didStartElement:在方法中添加此代码

if([elementname isEqualToString:@"yweather"]){
   [yourmutableArray addObject:attributeDict]
}
于 2012-07-12T11:15:43.003 回答
0

您是 iphone 编程新手吗,请查看一些关于 xml 解析和其他的教程。

http://www.raywenderlich.com/553/how-to-chose-the-best-xml-parser-for-your-iphone-project

http://www.raywenderlich.com/725/how-to-read-and-write-xml-documents-with-gdataxml

这是一个使用 GDataXML 解析器的示例应用程序。

http://db.tt/qoERN0LB

于 2012-07-12T11:13:32.433 回答