Skip to content

Commit 85915a7

Browse files
committed
Add README
1 parent f4aac27 commit 85915a7

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

High5.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1717
LICENSE = LICENSE
1818
pack.cmd = pack.cmd
1919
pack.sh = pack.sh
20+
README.md = README.md
2021
test.cmd = test.cmd
2122
test.sh = test.sh
2223
THIRD-PARTY-NOTICES = THIRD-PARTY-NOTICES

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# High5
2+
3+
[![Build Status][win-build-badge]][win-builds]
4+
[![Build Status][nix-build-badge]][nix-builds]
5+
[![NuGet][nuget-badge]][nuget-pkg]
6+
[![MyGet][myget-badge]][edge-pkgs]
7+
8+
High5 is a [spec-compliant HTML][html] parser [.NET Standard][netstd] library.
9+
It parses HTML the way the latest version of your browser does.
10+
11+
High5 was born by porting [parse5][parse5], which is in JavaScript, to C#.
12+
13+
High5's parser is generic. It can work with any tree model for an HTML
14+
document. A default model implementation is supplied that builds a read-only
15+
tree of HTML nodes.
16+
17+
18+
## Examples
19+
20+
Parse an HTML document:
21+
22+
```c#
23+
var html = await new HttpClient().GetStringAsync("http://www.example.com/");
24+
var document = Parser.Parse(html);
25+
```
26+
27+
Parse an HTML document:
28+
29+
```c#
30+
var html = @"
31+
<div>
32+
<h1>Example Domain</h1>
33+
<p>This domain is established to be used for illustrative examples
34+
in documents. You may use this domain in examples without prior
35+
coordination or asking for permission.</p>
36+
<p><a href='http://www.iana.org/domains/example'>More information...</a></p>
37+
</div>";
38+
39+
var fragment = Parser.ParseFragment(html, null);
40+
```
41+
42+
43+
[win-build-badge]: https://img.shields.io/appveyor/ci/raboof/high5.svg?label=windows
44+
[win-builds]: https://ci.appveyor.com/project/raboof/high5
45+
[nix-build-badge]: https://img.shields.io/travis/atifaziz/High5.svg?label=linux
46+
[nix-builds]: https://travis-ci.org/atifaziz/High5
47+
[myget-badge]: https://img.shields.io/myget/raboof/vpre/High5.svg?label=myget
48+
[edge-pkgs]: https://www.myget.org/feed/raboof/package/nuget/High5
49+
[nuget-badge]: https://img.shields.io/nuget/v/High5.svg
50+
[nuget-pkg]: https://www.nuget.org/packages/High5
51+
[html]: https://html.spec.whatwg.org
52+
[netstd]: https://docs.microsoft.com/en-us/dotnet/standard/net-standard
53+
[parse5]: https://github.com/inikulin/parse5

0 commit comments

Comments
 (0)