Skip to content
forked from atifaziz/High5

HTML parsing/serialization toolset for .NET

License

Notifications You must be signed in to change notification settings

adriguerra/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:

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 67.5%
  • C# 32.3%
  • Other 0.2%