我一直狩獵左右,但我有這個掙扎,我想從雅虎天氣XML 5天的天氣預報,即時通訊試圖挑選以下數據:C#雅虎天氣API5天預測
/description>
yweather:forecast day="Thu" date="27 Jun 2013" low="51" high="60" text="Partly Cloudy" code="29"/>
yweather:forecast day="Fri" date="28 Jun 2013" low="45" high="59" text="Rain" code="12"/>
yweather:forecast day="Sat" date="29 Jun 2013" low="52" high="58" text="Mostly Cloudy" code="28"/>
yweather:forecast day="Sun" date="30 Jun 2013" low="49" high="62" text="PM Showers" code="39"/>
yweather:forecast day="Mon" date="1 Jul 2013" low="48" high="61" text="Partly Cloudy" code="30"/>
我可以從第一行獲取數據,yweather:forecast day =「thu」date =「2013年6月27日..........
但我無法弄清楚如何從任何其他行,日=「星期五」,坐,太陽
任何幫助非常感謝
歡呼聲
這將幫助,如果你表現出你正在使用的數據拉代碼。 – Kixoka
'Temperature = channel.SelectSingleNode(「item」)。SelectSingleNode(「yweather:condition」,manager).Attributes [「temp」]。Value; Condition = channel.SelectSingleNode(「item」)。SelectSingleNode(「yweather:condition」,manager).Attributes [「text」]。Value;代碼= channel.SelectSingleNode(「item」)。SelectSingleNode(「yweather:condition」,manager).Attributes [「code」]。Value。 – Birdog
第一次發佈,仍然習慣於格式化,apoliogies – Birdog