Created
July 3, 2019 03:07
-
-
Save Adron/a82f44803107b169f5916d212077de87 to your computer and use it in GitHub Desktop.
The types, nodes, constants, etc setup for parsing HTML.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type NodeType int32 | |
const ( | |
ErrorNode NodeType = iota | |
TextNode | |
DocumentNode | |
ElementNode | |
Commentnode | |
DoctypeNode | |
) | |
type Node struct { | |
Type NodeType | |
Data string | |
Attr []Attribute | |
FirstChild, NextSibling *Node | |
} | |
type Attribute struct { | |
Key, Val string | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment