Documentation
¶
Overview ¶
Package h5 implements a wrapper and DSL for code.google.com/p/go/src/code.google.com/p/go.net/html.
tree, err := h5.New(rdr) tree.Walk(func(n *Node) { // do something with the node }) tree2 := tree.Clone()
Index ¶
- func Anchor(url, content string) *exphtml.Node
- func Children(n *html.Node) []*html.Node
- func CloneNode(n *exphtml.Node) *exphtml.Node
- func Data(n *exphtml.Node) string
- func Div(id string, class []string, children ...*exphtml.Node) *exphtml.Node
- func Element(name string, attrs []exphtml.Attribute, children ...*exphtml.Node) *exphtml.Node
- func Partial(r io.Reader) ([]*html.Node, error)
- func PartialFromString(s string) ([]*html.Node, error)
- func RenderNodes(w io.Writer, ns []*html.Node) error
- func RenderNodesToString(ns []*html.Node) string
- func Text(str string) *exphtml.Node
- func WalkNodes(n *exphtml.Node, f func(*exphtml.Node))
- type Tree
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Data ¶
String form of an html nodes data. (eg: The Tagname for ElementNodes or text for TextNodes)
func RenderNodesToString ¶
Types ¶
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
Tree represents an html5 Node tree.
func NewFromString ¶
Construct a new h5 parser from a string
Click to show internal directories.
Click to hide internal directories.