All Projects → atifaziz → High5

atifaziz / High5

Licence: mit
HTML parsing & serialization toolset for .NET Standard

Labels

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);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].