Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Anduin2017 committed Dec 6, 2018
1 parent 999c118 commit 8be1121
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Expand Up @@ -10,7 +10,7 @@ HSharp is a library used to analyse markup language like HTML easily and fastly.

HSharp is based on .NET Standard `2.0` and supports .NET Framework, .NET Core and Xamarin.

Current version: `2.0.1`
Current version: `2.1.0`

## Only Two Functions

Expand Down Expand Up @@ -42,7 +42,7 @@ dotnet add package Aiursoft.HSharp
Input some HTML and get the DOM of it.

````csharp
var NewDocument = HtmlConvert.DeserializeHtml($@"
var newDocument = HtmlConvert.DeserializeHtml($@"
<html>
<head>
<meta charset={"\"utf-8\""}>
Expand All @@ -59,11 +59,11 @@ var NewDocument = HtmlConvert.DeserializeHtml($@"
</body>
</html>");

Console.WriteLine(NewDocument["html"]["head"]["meta",0].Properties["charset"]);
Console.WriteLine(NewDocument["html"]["head"]["meta",1].Properties["name"]);
foreach (var Line in NewDocument["html"]["body"]["table"])
Console.WriteLine(newDocument["html"]["head"]["meta",0].Properties["charset"]);
Console.WriteLine(newDocument["html"]["head"]["meta",1].Properties["name"]);
foreach (var line in newDocument["html"]["body"]["table"])
{
Console.WriteLine(Line.Son);
Console.WriteLine(line.Son);
}
````

Expand All @@ -82,10 +82,10 @@ ThreeLine
Create a simple HDoc and add some children to its body.

````CSharp
var Document = new HDoc(DocumentOptions.BasicHTML);
Document["html"]["body"].AddChild("div");
Document["html"]["body"]["div"].AddChild("a", new HProp("href", "/#"));
var Result = Document.GenerateHTML();
var document = new HDoc(DocumentOptions.BasicHTML);
document["html"]["body"].AddChild("div");
document["html"]["body"]["div"].AddChild("a", new HProp("href", "/#"));
var result = document.GenerateHTML();
````

Output:
Expand Down

0 comments on commit 8be1121

Please sign in to comment.