Is it possible that there is no XmlNodeReader in windows store apps? This isn't in the System.Xml namespace and there is no XmlTextReader neither. What alternative tools do i have? I should consume a XML web api that simple:

var node = serviceClient.GetAllLeaguesAsync(apiKey);
XDocument xDoc = XDocument.Load(new XmlNodeReader(node));
有帮助吗?

解决方案

As I said in comment, if your goal is to convert XElement to XDocument, you can try without XmlNodeReader. For example :

var node = await serviceClient.GetAllLeaguesAsync(apiKey);
XDocument xDoc = new XDocument();
xDoc.AddFirst(node);

其他提示

How about using the IXmlNode Interface?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top