Documentation ¶
Index ¶
- func DisableDebug()
- func EnableDebug()
- func FindAllofem(n *html.Node, args []string) []*html.Node
- func FindOnce(n *html.Node, args []string, uni bool) (*html.Node, bool)
- func GetKeyValue(attributes []html.Attribute) map[string]string
- func HtmlToPlainText(s string)
- type Root
- func (r Root) Attrs() map[string]string
- func (r Root) Find(args ...string) Root
- func (r Root) FindAll(args ...string) []Root
- func (r Root) FindFirstChild() Root
- func (r Root) FindLastChild() Root
- func (r Root) FindNextElementSibling() Root
- func (r Root) FindNextSibling() Root
- func (r Root) FindParent() Root
- func (r Root) FindPrevElementSibling() Root
- func (r Root) FindPrevSibling() Root
- func (r Root) Text() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableDebug ¶
func DisableDebug()
func EnableDebug ¶
func EnableDebug()
func FindAllofem ¶
Using depth first search to find all occurrences and return
func GetKeyValue ¶
Returns a key pair value (like a dictionary) for each attribute
func HtmlToPlainText ¶
func HtmlToPlainText(s string)
Types ¶
type Root ¶
Root is a structure containing a pointer to an html node, the node value, and an error variable to return an error if occurred
func (Root) Find ¶
Find finds the first occurrence of the given tag name, with or without attribute key and value specified, and returns a struct with a pointer to it
func (Root) FindAll ¶
FindAll finds all occurrences of the given tag name, with or without key and value specified, and returns an array of structs, each having the respective pointers
func (Root) FindFirstChild ¶
FindFirstChild finds the first child of the pointer in the DOM returning a struct with a pointer to it
func (Root) FindLastChild ¶
FindLastChild finds the last child of the pointer in the DOM returning a struct with a pointer to it
func (Root) FindNextElementSibling ¶
FindNextElementSibling finds the next element sibling of the pointer in the DOM returning a struct with a pointer to it
func (Root) FindNextSibling ¶
FindNextSibling finds the next sibling of the pointer in the DOM returning a struct with a pointer to it
func (Root) FindParent ¶
FindParent finds the parent of the pointer in the DOM returning a struct with a pointer to it
func (Root) FindPrevElementSibling ¶
FindPrevElementSibling finds the previous element sibling of the pointer in the DOM returning a struct with a pointer to it
func (Root) FindPrevSibling ¶
FindPrevSibling finds the previous sibling of the pointer in the DOM returning a struct with a pointer to it