trenoncourt / HtmlAgilityPack.CssSelectors.NetCore

NetStandard version of HtmlAgilityPack.CssSelector
33 stars 17 forks source link

HtmlAgilityPack.CssSelectors.NetCore · NuGet PRs Welcome GitHub license

NetStandard version of HtmlAgilityPack.CssSelector which use HtmlAgilityPack

Installation

Install-Package HtmlAgilityPack.CssSelectors.NetCore

Usage

var doc = new HtmlAgilityPack.HtmlDocument();
doc.Load(new FileStream("test.html", FileMode.Open));

IList<HtmlNode> nodes = doc.QuerySelectorAll("div .my-class[data-attr=123] > ul li");
HtmlNode node = nodes[0].QuerySelector("p.with-this-class span[data-myattr]");

Buy me a beer

Donate