【发布时间】:2016-06-08 20:59:46
【问题描述】:
string webUrlCurrentGame = "";//usually the url
var readerCurrentGame = JsonReaderWriterFactory.CreateJsonReader(
Encoding.UTF8.GetBytes(webClient.DownloadString(webUrlCurrentGame)),
new System.Xml.XmlDictionaryReaderQuotas());
var currentGameRoot = XElement.Load(readerCurrentGame);
string gameMode = currentGameRoot.XPathSelectElement("//gameMode").Value;
string championId = currentGameRoot.XPathSelectElement("//championId").Value;
string SummonerName = currentGameRoot.XPathSelectElement("//summonerName").Value;
问题是 XML 中有 10 个召唤者名称,我如何从它们中获取值?
【问题讨论】:
-
请包含您的 XML(或它派生的 JSON),以便我们为您提供帮助。