Documentation
¶
Index ¶
- func FormatClassList(classList string) string
- func ParseAttributes(z *html.Tokenizer) map[string]string
- func ParseSelector(selector string) (string, string, string)
- type DOM
- type DOMNode
- func (d *DOMNode) AppendChild(nd *DOMNode)
- func (d DOMNode) GetElementByID(id string) *DOMNode
- func (d DOMNode) GetElementsByClassName(class string) []*DOMNode
- func (d DOMNode) GetElementsByTagName(tag string) []*DOMNode
- func (d DOMNode) GetText() string
- func (d DOMNode) QuerySelector(selector string) []*DOMNode
- func (d DOMNode) Render() string
- func (d DOMNode) String() string
- func (d DOMNode) Traverse(cb func(el DOMNode))
- type LinearDOM
- func (ld LinearDOM) GetElementByID(id string) *LinearDOMElement
- func (ld LinearDOM) GetElementsByClassName(class string) []*LinearDOMElement
- func (ld LinearDOM) GetElementsByTagName(tag string) []*LinearDOMElement
- func (d LinearDOM) QuerySelector(selector string) []*LinearDOMElement
- func (ld LinearDOM) Traverse(cb func(el LinearDOMElement))
- type LinearDOMElement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatClassList ¶
Types ¶
type DOM ¶
type DOM struct { Doctype string Tree *DOMNode Ids map[string]*DOMNode Tags map[string][]*DOMNode Classes map[string][]*DOMNode }
func ParseToDOM ¶
func (DOM) GetElementByID ¶
func (DOM) GetElementsByClassName ¶
func (DOM) GetElementsByTagName ¶
func (*DOM) RegisterToMaps ¶
type DOMNode ¶
type DOMNode struct { TagName string Text string Parent *DOMNode Children []*DOMNode Attributes map[string]string SelfEnclosed bool }
func (*DOMNode) AppendChild ¶
func (DOMNode) GetElementByID ¶
func (DOMNode) GetElementsByClassName ¶
func (DOMNode) GetElementsByTagName ¶
func (DOMNode) QuerySelector ¶
type LinearDOM ¶
type LinearDOM struct {
Content []*LinearDOMElement
}
func ParseToLinear ¶
func (LinearDOM) GetElementByID ¶
func (ld LinearDOM) GetElementByID(id string) *LinearDOMElement
func (LinearDOM) GetElementsByClassName ¶
func (ld LinearDOM) GetElementsByClassName(class string) []*LinearDOMElement
func (LinearDOM) GetElementsByTagName ¶
func (ld LinearDOM) GetElementsByTagName(tag string) []*LinearDOMElement
func (LinearDOM) QuerySelector ¶
func (d LinearDOM) QuerySelector(selector string) []*LinearDOMElement
func (LinearDOM) Traverse ¶
func (ld LinearDOM) Traverse(cb func(el LinearDOMElement))
type LinearDOMElement ¶
type LinearDOMElement struct { TagName string Text string Attributes map[string]string SelfEnclosed bool }
func (LinearDOMElement) GetText ¶
func (d LinearDOMElement) GetText() string
func (LinearDOMElement) String ¶
func (d LinearDOMElement) String() string
Click to show internal directories.
Click to hide internal directories.