Skip to content
/ High5 Public

HTML parsing & serialization toolset for .NET Standard

License

Notifications You must be signed in to change notification settings

atifaziz/High5

Repository files navigation

High5

Build Status Build Status NuGet MyGet

High5 is a spec-compliant HTML parser .NET Standard library. It parses HTML the way the latest version of your browser does.

High5 was born by porting parse5, which is in JavaScript, to C#.

High5's parser is generic. It can work with any tree model for an HTML document. A default model implementation is supplied that builds a read-only tree of HTML nodes.

Examples

Parse an HTML document:

var html = await new HttpClient().GetStringAsync("http://www.example.com/");
var document = Parser.Parse(html);

Parse an HTML document fragment:

var html = @"
  <div>
    <h1>Example Domain</h1>
    <p>This domain is established to be used for illustrative examples
       in documents. You may use this domain in examples without prior
       coordination or asking for permission.</p>
    <p><a href='http://www.iana.org/domains/example'>More information...</a></p>
  </div>";

var fragment = Parser.ParseFragment(html, null);

About

HTML parsing & serialization toolset for .NET Standard

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages