AgileDotNetHtml 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package AgileDotNetHtml --version 1.0.2
NuGet\Install-Package AgileDotNetHtml -Version 1.0.2
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="AgileDotNetHtml" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AgileDotNetHtml --version 1.0.2
#r "nuget: AgileDotNetHtml, 1.0.2"
#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.
// Install AgileDotNetHtml as a Cake Addin
#addin nuget:?package=AgileDotNetHtml&version=1.0.2

// Install AgileDotNetHtml as a Cake Tool
#tool nuget:?package=AgileDotNetHtml&version=1.0.2

Agile Dot Net Html

Table of Contents

Introduction

I believe that have many great libraries for working whit HTML in C#, but here is a good alternative. AgileDotNetHtml is a library that gives features as parsing and building HTML. The library allow you convert HTML to C# objects represent this HTML and Build these object to HTML string again. There is a rich set of C# object which represent HTML elements and their attributes by w3 school HTML 5 standard. The idea of this project is to allow you fast and easy create and edit composite HTML structures.

Getting Started

Parse Page

  • Load and parse page from specific url.
	HtmlParser parser = new HtmlParser();
	HtmlDocument documnet = parser.ParsePageFromUrl(path);

Parse String

  • Parse specific HTML string
	string htmlString = "<div class='some element'><ul class='ul'><li></li><li></li></ul></div>";
	HtmlParser parser = new HtmlParser();		
	IHtmlElementsCollection elements =  parser.ParseString(htmlString);

Build Html Content

  • Create HTML content containing form elements whit different kinds of inputs.
	HtmlFormElement formElement = new HtmlFormElement();
				
	HtmlInputElement textInput = new HtmlInputElement("text");
	textInput.Name = "TextInput";
	textInput.Value = "Some value";
				
	HtmlInputElement radioInput = new HtmlInputElement("radio");
	radioInput.Name = "RadioInput";
	radioInput.Value = "Some value";

	HtmlTextareaElement textArea = new HtmlTextareaElement();
	textArea.Name = "TextArea";
	textArea.Text("Some text...");

	formElement.Append(radioInput);
	formElement.Append(textInput);
	formElement.Append(textArea);

	HtmlBuilder builder = new HtmlBuilder();
	IHtmlContent formHtmlContent = builder.CreateHtmlContent(formElement);

Authors

Atanas Galchov

License

AgileDotNetHtml is open source software licensed as MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 515 5/8/2021
1.0.2 307 4/27/2021
1.0.1 309 4/20/2021
1.0.0 323 4/20/2021