问题
Is there an easy way to perform XPath query's on XML in a Windows 8 metro app? System.Xml.XPath does not exist in the .NET framework used to create metro apps and after trying to use the HTMLAgilityPack I haven't been able to make any progress either.
Are there an easy way to perform these query's?
回答1:
I am not sure what you are trying to accomplish exactly, but you could try and leverage System.XML.Linq which provides access to XDocument, XElement, XName, XNode, XContainer etc and Parse methods for each. See an example of using queries and using the classes in System.XML and System.XML.Linq here: http://code.msdn.microsoft.com/windowsapps/XLinq-XmlReader-and-1e17c0a5
来源:https://stackoverflow.com/questions/15324748/missing-xpath-in-windows-metro-app