![]() |
VOOZH | about |
dotnet add package AngleSharp.XPath --version 2.0.6
NuGet\Install-Package AngleSharp.XPath -Version 2.0.6
<PackageReference Include="AngleSharp.XPath" Version="2.0.6" />
<PackageVersion Include="AngleSharp.XPath" Version="2.0.6" />Directory.Packages.props
<PackageReference Include="AngleSharp.XPath" />Project file
paket add AngleSharp.XPath --version 2.0.6
#r "nuget: AngleSharp.XPath, 2.0.6"
#:package AngleSharp.XPath@2.0.6
#addin nuget:?package=AngleSharp.XPath&version=2.0.6Install as a Cake Addin
#tool nuget:?package=AngleSharp.XPath&version=2.0.6Install as a Cake Tool
👁 GitHub Tag
👁 NuGet Count
👁 Issues Open
👁 Gitter Chat
👁 StackOverflow Questions
AngleSharp.XPath extends AngleSharp with the ability to select nodes via XPath queries instead of CSS selector syntax. This is more powerful and potentially more common for .NET developers working with XML on a daily basis.
With this library using XPath queries is as simple as writing
var contentNode = document.Body.SelectSingleNode("//div[@id='content']");
Besides SelectSingleNode we can also use SelectNodes. Both are extension methods defined in the AngleSharp.XPath namespace.
If wanted we can also use XPath directly in CSS selectors such as in QuerySelector or QuerySelectorAll calls. For this we only need to apply the following configuration:
var config = Configuration.Default.WithXPath();
Now we can write queries such as
var secondLi = document.QuerySelector("*[xpath>'//li[2]']");
It is important that the original selector has all elements (*) as the intersection of the ordinary CSS selector and the XPath attribute is considered. The XPath attribute consists of a head (xpath>) and a value - provided as a string, e.g., //li[2].
XPathNavigator from System.Xml.XPathParticipation in the project is highly welcome. For this project the same rules as for the AngleSharp core project may be applied.
If you have any question, concern, or spot an issue then please report it before opening a pull request. An initial discussion is appreciated regardless of the nature of the problem.
Live discussions can take place in our Gitter chat, which supports using GitHub accounts.
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.
For more information see the .NET Foundation Code of Conduct.
This project is supported by the .NET Foundation.
The MIT License (MIT)
Copyright (c) 2018 - 2026 Denis Ivanov, AngleSharp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on AngleSharp.XPath:
| Package | Downloads |
|---|---|
|
Finance.NET
A .NET library for retrieving real-time and historical financial data from Yahoo Finance and other popular sources. |
|
|
WebReaper
Declarative high performance web scraper in C#. Easily crawl any web site and parse the data, save structed result to a file, DB, etc. |
|
|
UnDotNet.BootstrapEmail
Package Description |
|
|
Optivulcan
A simple timetable parser for Optivum UONET+ written in C# |
|
|
invoisys.SDK.Xml
Package Description |
Showing the top 2 popular GitHub repositories that depend on AngleSharp.XPath:
| Repository | Stars |
|---|---|
|
Decimation/SmartImage
Reverse image search tool (SauceNao, IQDB, Ascii2D, trace.moe, and more)
|
|
|
alex-on-ai/WebReaper
AI-native web scraper. Single binary with a bundled Claude Code skill. MIT-licensed alternative to Firecrawl.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.6 | 12,802 | 2/17/2026 |
| 2.0.5 | 103,488 | 2/10/2025 |
| 2.0.4 | 258,965 | 4/1/2024 |
| 2.0.3 | 191,347 | 6/6/2023 |
| 2.0.2 | 15,282 | 6/1/2023 |
| 2.0.1 | 257,846 | 7/20/2022 |
| 2.0.0 | 89,528 | 6/1/2022 |
| 1.1.7 | 356,207 | 4/1/2020 |
| 1.1.6 | 34,381 | 1/6/2020 |
| 1.1.5 | 22,362 | 11/16/2019 |
| 1.1.4 | 31,018 | 5/22/2019 |
| 1.1.3 | 39,242 | 5/6/2019 |
| 1.1.2 | 51,498 | 4/11/2019 |
| 1.1.1 | 14,758 | 3/1/2019 |
| 1.1.0 | 16,567 | 1/6/2019 |
| 1.0.2 | 112,268 | 3/9/2018 |
| 1.0.1 | 15,369 | 1/5/2018 |