NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet, #161 most downloaded on NuGet
This is an agile HTML parser that builds a read/write DOM and supports plain XPATH or XSLT (you actually don't HAVE to understand XPATH nor XSLT to use it, don't worry...). It is a .NET code library that allows you to parse "out of the web" HTML files. The parser is very tolerant with "real world" malformed HTML. The object model is very similar to what proposes System.Xml, but for HTML documents (or streams). --------------------------------------- This library is sponsored by ZZZ Projects: https://entityframework-extensions.net/ https://eval-expression.net/ https://dapper-plus.net/ --------------------------------------- HAP is trusted by companies worldwide with over 150 million downloads.
Latest stable
1.13.1
Last release 1 months ago
12 Oct 2026
Release timing varies
gaps range from 2 weeks to 9 months
Nearly every release is documented
notes for 58 of the last 60 stable releases
18 versions withdrawn
withdrawn after publishing
127 years old
174 releases · first in 1900
Drag across the ruler to compare, or tap a release to open it.
MERGED: Improve Encapsulator #379
Nothing published for this version
FIXED: Duplicate id when setting it using HtmlNode.Id #374
Your coding agent can read these notes before it upgrades. Set up the MCP server →
ADDED: GetDataAttribute, GetDataAttributes, GetAttributes methods
FIXED: HtmlAttribute escaping #358
FIXED: Encoding is in CharacterSet for HTML #346
FIXED: HtmlNode.AddClass won't add "btn" if "btn-primary" is already added. #337
MERGED: add check on null for Openednodes dictionary, add unit test #331
MERGED: InternalInnerText string concatenation to StringBuilder.Append #334
MERGED: Remove unnecessary object initializations from HtmlNodeNavigator.Clone() #328
FIXED: Script and Style only appears in InnerText for head, script and style tag #317
Script and Style only appears in InnerText for head, script and style tag #317FIXED: HtmlNode.InnerText Not working properly (JS get Working normally) maybe a bug? #317
FIXED: Serialization doesn't support html encoding #316
FIXED: XML processing instruction(s) are classified as a textnode? #309
FIXED: Issue with Title tag that contains xml characters
Title tag that contains xml characters (#304)FIXED: Issue with Title tag that contains xml characters
Title tag that contains xml characters (#304)FIXED: Issue with the latest release not using the latest dll
FIXED: HtmlWeb.LoadFromWebAsync does not respect UserAgent #298
FIXED: HtmlWeb.GetExtensionForContentType throws an exception on .NET Framework 4.5.2 #294
ADDED: OptionMaxNestedChildNodes option to specify a maximum number of nesting
OptionMaxNestedChildNodes option to specify a maximum number of nestingFIXED: HtmlNode.LinePosition is not accurate for attributes #288
ADDED: Support to .NET Framework 3.5
FIXED: Issue with missing ending tag
DisableBehavaiorTagP to DisableBehaviorTagPDisableBehaviorTagP should now always work even if the HtmlNode static constructor has been called.FIXED: Restore old IsImplicitEnd for P tag when DisableBehaviorTagP = false
IsImplicitEnd for P tag when DisableBehaviorTagP = falseFIXED: Added all Implicit end logic for the P tag
P tagBREAKING CHANGES: HtmlDocument.DisableBehavaiorTagP is now set to true by default. p tag will now act more like div and other tags. You can get the sa…
HtmlDocument.DisableBehavaiorTagP is now set to true by default. p tag will now act more like div and other tags. You can get the same behavior as before by setting this property to false.FIXED: Empty p elements will strip away the end tag #276
FIXED: lib\uap10.0\HtmlAgilityPack.dll targets x86 #283
REVAMP: source revamp to remove old source/project
UPDATED: NuGet package dependencie (Issue #274 )
FIXED: Issue with OuterLength and InnerLength that had sometime a wrong value
OuterLength and InnerLength that had sometime a wrong valueFIXED: Cloned nodes do not preserve original element name casing #273
FIXED: TRACE constant is defined for release configuration of .net standard project #265
FIXED: Net Standard not yet CLS-compliant
FIXED: Issue with Deep Clone that contains child nodes
MERGED: Fixed for indexing strings out of bounds #247
FIXED: HtmlNodeCollection.FindFirst finds elements when searching for "b" #233
repository metadata. #234FIXED: Filename not escaped when cached on computer - IOException on load html #228
ADDED: Overload to DetectEncoding method (Encoding detection logic? #213)
ADDED: UseOriginalName method to keep original name on attribute #199
UseOriginalName method to keep original name on attribute #199var doc = new HtmlAgilityPack.HtmlDocument();
doc.LoadHtml(@"<svg version=""1.1"" xmlns=""http://www.w3.org/2000/svg"" xmlns:xlink=""http://www.w3.org/1999/xlink"" width=""100%"" height=""100%"" viewBox=""0 0 600 800"">
<rect x=""0"" y=""0"" fill=""#000007"" width=""600"" height=""100%""></rect>
<image width=""600"" height=""800"" xlink:href=""images/cover.jpg"" transform=""translate(0 0)""></image>
</svg>");
doc.UseAttributeOriginalName("svg");
Nothing published for this version
FIXED: Setting HtmlTextNode.Id causes StackOverflowException on Save #188
MERGED: Correct StreamPosition in text node inside script element #176
ParseExecuting eventvar html1 = @"<html><body><br\>bar</body></html>";
var doc1 = new HtmlAgilityPack.HtmlDocument();
doc1.ParseExecuting = x => x.Text = x.Text.Replace(@"<br\>", "<br/>");
doc1.LoadHtml(html1);
MERGED: Expose HTMLNode and HTMLAttribute exact position #172
FIXED: Issue with the ExtensionAttribute added in v1.7.4 (HtmlAgilityPack 1.7.3 can no longer be used in the project #164)
ExtensionAttribute added in v1.7.4 (HtmlAgilityPack 1.7.3 can no longer be used in the project #164)ADDED: UsingCacheIfExists option in HtmlWeb to take HTML directly from the cache if the file exists
UsingCacheIfExists option in HtmlWeb to take HTML directly from the cache if the file existsdiv && p tag (Closing Paragraph tag removed when no content provided #55)MERGED: Encoding definition improvement #154
FIXED: Wrong-closed HTML comment #150
MODIFIED: NETSTANDARD2_0 now use the same API as FX45. (Please add net46 dll in the Nuget #119)
MERGED: Feature/139 html node.write virtual #140
FIXED: Cannot specify custom encoding for HtmlWeb instance #136
FIXED: Setting an attribute via index on the HtmlAttributeCollection does not update the underlying dictionary #135
Nothing published for this version
FIXED: Stackoverflow with very large document that has many non-closed tags #130
FIXED: Stackoverflow with very large document that has many non-closed tags #130
FIXED: [Regression] HAP wrongly parses website when using tr-TR language. #128
FIXED: Newly added element cannot be found using ID attribute #105
Help us to support this library: Donate
Nothing published for this version
FIXED: HtmlNode id attribute is not set succesfully #115 ADDED: Minor performance and GC traffic optimizations #97
FIXED: Node not updating parent #106 FIXED: Parsing invalid attribute #113
One column per quarter.