如何在.Net Core 1.0中使用XPathSelectElement?

编程入门 行业动态 更新时间:2024-10-12 22:30:15
本文介绍了如何在.Net Core 1.0中使用XPathSelectElement?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

In .Net 4.X, this extension method is under System.Xml.XPath.

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

However I'd like to know how could I find/use it in .Net Core? I have a class library.

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

The porting tool doesn't show anything about XPathSelectElement.

还是.Net核心中的替代品?

Or maybe any replacement in .Net core?

非常感谢!

推荐答案

您需要添加软件包 System.Xml.XPath.XDocument 4.0.1 。该软件包提供了扩展方法,这些扩展方法将 System.Xml.XPath 支持添加到 System.Xml.XDocument 软件包中。

You need to add package System.Xml.XPath.XDocument 4.0.1. This package provides extension methods that add System.Xml.XPath support to the System.Xml.XDocument package.

在Package Manager控制台中运行以下命令。

Run below command in Package Manager Console.

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

也可以从以下位置安装具有版本 NuGet 2.12 或更高版本的NuGet软件包管理器。

You can also install it from NuGet package manager having version NuGet 2.12 or higher.

更多推荐

如何在.Net Core 1.0中使用XPathSelectElement?

本文发布于:2023-11-06 08:23:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1563181.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何在   Net   Core   XPathSelectElement

发布评论

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

>www.elefans.com

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