0
string url = "http://rss.weatherzone.com.au/?u=12994-1285<=twcid&lc=160255&obs=1&fc=1";
XmlReader reader = XmlReader.Create(url);
SyndicationFeed feed = SyndicationFeed.Load(reader);
reader.Close();
alın güncel hava:
var temperature = feed.Items.ToList()[0].Summary.Text.Trim();
Çıktı:
<b>Temperature:</b> 33.0°C
<img align="top" src="http://www.weatherzone.com.au/images/widgets/nav_trend_steady.gif" alt="steady"/>
<br />
<b>Feels like:</b> 38.0°C<br />
<b>Dew point:</b> 23.0°C
<img align="top" src="http://www.weatherzone.com.au/images/widgets/nav_trend_steady.gif" alt="steady"/>
<br />
<b>Relative humidity:</b> 56%<br />
<b>Wind:</b> NE at 18 km/h, gusting to km/h
<img align="top" src="http://www.weatherzone.com.au/images/widgets/nav_trend_steady.gif" alt="steady"/>
<br />
<b>Rain:</b> mm since 9am<br />
<b>Pressure:</b> 1013.0 hPa
<img align="top" src="http://www.weatherzone.com.au/images/widgets/nav_trend_steady.gif" alt="steady"/>
<br />
Soru: Bu çıktıda Sıcaklık alabilirim?
sizin 'SyndicationFeed' nedir? Tam ad alanını sağlayabilir misiniz, lütfen? –
Merhaba, System.ServiceModel.dll System.ServiceModel.Syndication kullanarak ekleyebilirsiniz –