Пример #1
0
// Parses a string which contains a html.
func Parse(htm string) (Nodes, error) {
	n, err := html.Parse(bytes.NewBufferString(htm))
	return Nodes{&Node{n}}, err
}
Пример #2
0
// Parse a stream of html.
func Parse(r io.Reader) (Nodes, error) {
	n, err := html.Parse(r)
	return Nodes{&Node{n}}, err
}