문제

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