【问题标题】:How to use XPathSelectElement in .Net Core 1.0?如何在 .Net Core 1.0 中使用 XPathSelectElement?
【发布时间】:2017-05-01 19:10:43
【问题描述】:

.Net 4.X中,这个扩展方法在System.Xml.XPath下。

但是我想知道如何在 .Net Core 中找到/使用它?我有一个类库。

移植工具没有显示任何关于XPathSelectElement 的信息。

或者 .Net 核心中的任何替代品?

非常感谢!

【问题讨论】:

标签: c# xpath asp.net-core nuget .net-core


【解决方案1】:

您需要添加包System.Xml.XPath.XDocument 4.0.1。此包提供扩展方法,可将System.Xml.XPath 支持添加到System.Xml.XDocument 包。

在包管理器控制台中运行以下命令。

PM> Install-Package System.Xml.XPath.XDocument -Version 4.0.1

您也可以从版本为 NuGet 2.12 或更高版本的 NuGet 包管理器安装它。

【讨论】:

    【解决方案2】:

    按照 Lex Li 的建议,我们可以使用 this website 来搜索包名。就我而言,它是:System.Xml.XPath.XDocument

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-14
      • 1970-01-01
      • 1970-01-01
      • 2015-04-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多