Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use XPathSelectElement in .Net Core 1.0?

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

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

The porting tool doesn't show anything about XPathSelectElement.

Or maybe any replacement in .Net core?

Thanks a lot!

like image 644
Samuel Avatar asked Dec 16 '16 03:12

Samuel


1 Answers

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.

Run below command in Package Manager Console.

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

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

like image 69
Rahul Nikate Avatar answered Nov 05 '22 04:11

Rahul Nikate