I have class was written by C#, It used XmlNode and XmlNodelist to read XML file. But When I bring it to my WP8 project, It's didn't support XmlNode and XmlNodelist. What should I do ? Thank you.
What should I do?
You should use LINQ to XML (XDocument
etc) instead. It's a far superior XML API. Once you've ported your code to use it, ditch the XmlNode
(etc) code entirely - use LINQ to XML in both your desktop and mobile code. Unless you really need to use .NET 3.0 or earlier, you should (IMO) try to avoid ever using XmlDocument
and friends again.
(Some of the types like XmlReader
are used in both the old and new APIs - but the DOM types themselves are completely separate.)
See more on this question at Stackoverflow