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個summonerNames如何從所有這些值中獲取值?C#循環遍歷Xelement
請包含您的XML(或從其派生的JSON),以便我們可以幫助您。 –