サンプルXML用のテキストを取得します。は、XMLノード
<query yahoo:count="1" yahoo:created="2016-03-31T06:43:49Z" yahoo:lang="en-US">
<results>
<channel>
<item>
<yweather:condition code="28" date="Thu, 31 Mar 2016 08:00 AM SAST" temp="58" text="Mostly Cloudy"/>
</item>
</channel>
</results>
</query>
コード:
string weburl = "https://query.yahooapis.com/v1/public/yql?q=select%20item.condition%20from%20weather.forecast%20where%20woeid%20in%20%28select%20woeid%20from%20geo.places%281%29%20where%20text%3D%22Cape%20Town%22%29&format=xml&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys";
var xml = await new WebClient().DownloadStringTaskAsync(new Uri(weburl));
XmlDocument doc = new XmlDocument();
doc.LoadXml(xml);
XmlElement root = doc.DocumentElement;
XmlNodeList nodes = root.SelectNodes("//query/results/channel/item");
foreach (XmlNode node in nodes)
{
MessageBox.Show(node.InnerXml);
}
私はちょうどがoutputed 一時とテキストを取得するために苦労してきたが、私は方法を見つけることができませんどのように、これは私が得る限りです。
私たちはthaを願っていますあなたの問題は解決されました。そうでない場合は、多分あなたの質問を更新すると思います.... http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work/5235#5235 – Monty