htmlhelper

package
Version: v0.0.0-...-fe056f4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2014 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func False

func False(*html.Node) bool

func FilterNode

func FilterNode(node *html.Node, pred Predictor) (nodes []*html.Node)

func GetElementById

func GetElementById(node *html.Node, id string) (result *html.Node)

document.GetElementById()

func GetElementsByClassName

func GetElementsByClassName(node *html.Node, cls string) []*html.Node

node.GetElementsByClassName()

func GetElementsByName

func GetElementsByName(node *html.Node, name string) []*html.Node

document.GetElementById()

func GetElementsByTagName

func GetElementsByTagName(node *html.Node, tag string) []*html.Node

node.GetElementsByTagName()

func Html

func Html(node *html.Node) string

func Main

func Main()

func NodeAttr

func NodeAttr(node *html.Node, name string) string

func NodeClasses

func NodeClasses(node *html.Node) (classes []string)

func NodeText

func NodeText(node *html.Node) (text string)

func ParseHtml

func ParseHtml(in io.Reader)

func Test

func Test(r io.Reader)

func Text

func Text(node *html.Node) string

func True

func True(*html.Node) bool

helper for walker

func WalkNode

func WalkNode(node *html.Node, f Processor)

func WalkNodeUntil

func WalkNodeUntil(node *html.Node, f Processor, pred Predictor)

func Wget

func Wget(url, filename string) (err error)

Types

type CSS

type CSS struct {
	Selector Selector
	Roles    []Role
}

.container { max-width: 1200px; }

func (CSS) ShortString

func (self CSS) ShortString() string

func (CSS) String

func (self CSS) String() string

type Predictor

type Predictor func(*html.Node) bool

type Processor

type Processor func(*html.Node)

type Role

type Role struct{ Name, Value string }

height: 20px;

func (Role) String

func (self Role) String() string

type Selector

type Selector []SimpleSelector

ul li a, tr td a

func NewSelector

func NewSelector(in string) *Selector

func (Selector) String

func (self Selector) String() string

type SimpleSelector

type SimpleSelector []string

ul li a

func (SimpleSelector) String

func (self SimpleSelector) String() string

Stringer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL