html_parse

package
v0.0.0-...-5e1b394 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	*html.Node
	Childs []*Node
}

Node is slightly modified version of golang.org/x/net/html.Node

func ParseBytes

func ParseBytes(byts []byte) (*Node, error)

ParseBytes parse HTML bytes to marshalable node

func (*Node) SearchAllNode

func (n *Node) SearchAllNode(ty html.NodeType, data, namespace, key, val string) []Node

SearchAllNode search nodes matched with options. ty for HTML object type, data is for HTML tag name, key is for attribute key val is for attribute value with key

func (*Node) SearchNode

func (n *Node) SearchNode(ty html.NodeType, data, namespace, key, val string) *Node

SearchNode search a node matched with params. ty for HTML object type, data is for HTML tag name, key is for attribute key val is for attribute value with key

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL