Documentation
¶
Index ¶
- func FindAllNodesRec(n *html.Node, fn NodeMatcher) []*html.Node
- func FindFirstNode(n *html.Node, fn NodeMatcher) *html.Node
- func FirstChildNodeText(doc *html.Node) string
- func GetAttrValue(attributes []html.Attribute, key string) string
- func ListChildren(n *html.Node, matcher NodeMatcher) []*html.Node
- func NodeHasAttr(n *html.Node, key string, matcher StringMatcher) bool
- type NodeMatcher
- type StringMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindAllNodesRec ¶
func FindAllNodesRec(n *html.Node, fn NodeMatcher) []*html.Node
func FindFirstNode ¶
func FindFirstNode(n *html.Node, fn NodeMatcher) *html.Node
func FirstChildNodeText ¶
func ListChildren ¶
func ListChildren(n *html.Node, matcher NodeMatcher) []*html.Node
func NodeHasAttr ¶
func NodeHasAttr(n *html.Node, key string, matcher StringMatcher) bool
NodeHasAttr is deprecated, use HasAttr instead.
Types ¶
type NodeMatcher ¶
func All ¶
func All(matchers ...NodeMatcher) NodeMatcher
func Any ¶
func Any(matchers ...NodeMatcher) NodeMatcher
func HasAttr ¶
func HasAttr(key string, matcher StringMatcher) NodeMatcher
func HasTag ¶
func HasTag(tag string) NodeMatcher
func IsTextNode ¶
func IsTextNode() NodeMatcher
type StringMatcher ¶
func StartingWith ¶
func StartingWith(prefix string) StringMatcher
func StringIs ¶
func StringIs(expected string) StringMatcher
Click to show internal directories.
Click to hide internal directories.