PeterJuhasz.Text.Html 1.1.0-preview.15

This is a prerelease version of PeterJuhasz.Text.Html.
dotnet add package PeterJuhasz.Text.Html --version 1.1.0-preview.15
                    
NuGet\Install-Package PeterJuhasz.Text.Html -Version 1.1.0-preview.15
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PeterJuhasz.Text.Html" Version="1.1.0-preview.15" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PeterJuhasz.Text.Html" Version="1.1.0-preview.15" />
                    
Directory.Packages.props
<PackageReference Include="PeterJuhasz.Text.Html" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PeterJuhasz.Text.Html --version 1.1.0-preview.15
                    
#r "nuget: PeterJuhasz.Text.Html, 1.1.0-preview.15"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PeterJuhasz.Text.Html@1.1.0-preview.15
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PeterJuhasz.Text.Html&version=1.1.0-preview.15&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=PeterJuhasz.Text.Html&version=1.1.0-preview.15&prerelease
                    
Install as a Cake Tool

HTML

A high performance HTML parser for .NET.

High-level API

This API builds a DOM tree from the HTML document.

var dom = HtmlDocument.Parse(html);

Explore the DOM:

var childNodes = dom.Nodes;
var children = dom.Elements();
var descendants = dom.Descendants();

Query the DOM:

var element = document.GetElementById("id");
var elements = document.GetElementsByTagName("div");
var elements = document.GetElementsByClassName("class");
var elements = document.QuerySelectorAll("div.class");
var links = document.QuerySelectorAll("ul > li:nth-child(odd) a[href^='https:']");

Low-level lazy API

This API parses the HTML document on the fly, as you explore the DOM tree.

var dom = LazyHtmlDocument.Parse(html); // no parsing is done yet

Explore the DOM:

var childNodes = dom.Nodes();
var children = dom.Elements();
var descendants = dom.Descendants();

Query the DOM:

var element = document.GetElementById("id");
var elements = document.GetElementsByTagName("div");
var elements = document.GetElementsByClassName("class");
var elements = document.QuerySelectorAll(
	element: "div",
	classNames: "class",
	attributes: [new("data-attr", "value")]
);

Writer

High performance HTML writer.

var writer = HtmlWriter.Create(new ArrayBufferWriter<char>());

writer.WriteHtml5Doctype();
writer.OpenElement("p");
writer.WriteText("click");
writer.OpenElement("a");
writer.WriteAttribute("href", "https://example.com");
writer.WriteText("here");
writer.CloseElement();
writer.CloseElement();
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on PeterJuhasz.Text.Html:

Package Downloads
PeterJuhasz.Text.Markdown

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0-preview.15 0 10/7/2026
1.1.0-preview.14 922 9/28/2026
1.1.0-preview.13 378 9/24/2026
1.1.0-preview.11 80 9/24/2026
1.1.0-preview.10 94 9/24/2026
1.0.0-preview.9 69 9/23/2026
1.0.0-preview.8 239 9/22/2026
1.0.0-preview.7 81 9/22/2026
1.0.0-preview.6 58 9/22/2026
1.0.0-preview.5 55 9/22/2026
1.0.0-preview.4 50 9/22/2026
1.0.0-preview.2 404 9/21/2026