-1
我有XML結構如下如何使用目標c從xml獲取數據?
<xml_api_reply version="1">
<weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0">
<forecast_information>
<city data="Chennai, Tamil Nadu"/>
<postal_code data="chennai"/>
<forecast_date data="2011-12-13"/>
<current_date_time data="1970-01-01 00:00:00 +0000"/>
<unit_system data="US"/>
</forecast_information>
<current_conditions>
<condition data="Haze"/>
<temp_f data="84"/>
<temp_c data="29"/>
<humidity data="Humidity: 58%"/>
<icon data="/ig/images/weather/haze.gif"/>
<wind_condition data="Wind: NE at 13 mph"/>
</current_conditions>
</weather >
</xml_api_reply>
如何獲取這些數據,並將其存儲在一個數組?
後你看一看的NSXMLParser模型文檔? – V1ru8
請提供有關該問題的足夠信息。你想從服務器拉數據還是從本地文件讀取數據? – Krishnan
[如何使用目標c從xml中獲取索引數據]的精確副本(http://stackoverflow.com/questions/8486902/how-to-fetch-data-with-index-from-the-xml- using-objective-c) - 爲什麼再次發佈相同的問題? – jrturton