Question

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));
Was it helpful?

Solution

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);

OTHER TIPS

How about using the IXmlNode Interface?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top