Adron
7/3/2019 - 3:07 AM

The types, nodes, constants, etc setup for parsing HTML.

The types, nodes, constants, etc setup for parsing HTML.

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
}