通用Windows平台中的System.Xml.XPath

编程入门 行业动态 更新时间:2024-10-25 06:27:01
本文介绍了通用Windows平台中的System.Xml.XPath的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

根据MSDN,System.Xml.XPath中的Extensions类应可用于通用Windows平台(Windows 10):

According to MSDN, Extensions class in System.Xml.XPath should be available for Universal Windows Platform (Windows 10):

msdn.microsoft/zh-CN/library/system.xml.xpath.extensions(v=vs.110).aspx

但是,在默认配置中,甚至System.Xml.XPath命名空间都不可用.编译器和IntelliSense找不到它,甚至Resharper也找不到丢失的参考-尽管根据MSDN,它应该在System.Xml.Linq.dll中.(我可以毫无问题地使用LINQ)

However in default configuration not even the System.Xml.XPath namespace is available. The compiler and IntelliSense doesn't find it and even Resharper is unable to find the missing reference - although according to MSDN it should be in System.Xml.Linq.dll. (I can use LINQ without any problem)

在参考管理器中,我也找不到装配.

Also in the reference manager I was unable to find a fitting assembly.

通过一些研究,我在NuGet上找到了这个官方的System.Xml.XPath软件包: www.nuget/packages/System.Xml.XPath/

With some research I've found this official System.Xml.XPath package on NuGet: www.nuget/packages/System.Xml.XPath/

但是,它也不包含Extension类(因此也不包含XPathSelectElement扩展方法).(但至少是其他XPath类)

However this does not contain the Extension class (and thus the XPathSelectElement extension method) either. (But at least the other XPath classes)

我做错什么了吗?或者这是文档中的错误,并且这些类都不适用于Windows 10?

Am I doing something wrong or this is an error in the documentation and none of these classes are available for Windows 10?

我已经做过的事情:

  • Visual Studio重新启动
  • Windows重新启动
  • 在另一台计算机上进行测试
推荐答案

因此,事实证明,您必须将 System.Xml.XPath.XDocument 程序包与Nuget添加在一起.不幸的是,在MSDN上没有对此进行记录.

So, it turned out that you have to add the System.Xml.XPath.XDocument Package with Nuget. It is a bit unfortunate that this is so undocumented on MSDN.

在MSDN Social上获得信贷: social.msdn.microsoft/Forums/windowsapps/zh-CN/46cc17ce-b562-4089-be9c-dd5aa53b36de/systemxmlxpath-in-universal-windows-platform?forum=wpdevelop

Credit goes to winffee on MSDN Social: social.msdn.microsoft/Forums/windowsapps/en-US/46cc17ce-b562-4089-be9c-dd5aa53b36de/systemxmlxpath-in-universal-windows-platform?forum=wpdevelop

更多推荐

通用Windows平台中的System.Xml.XPath

本文发布于:2023-11-03 12:55:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555188.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:平台   Windows   System   XPath   Xml

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!