Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document interface {
// Find returns a Selection matching the given selector
Find(selector string) Selection
// Html returns the HTML content of the document
Html() (string, error)
// Text returns the text content of the document
Text() string
}
Document represents an HTML document
type Selection ¶
type Selection interface {
// Find returns a new Selection filtered by the given selector
Find(selector string) Selection
// Html returns the HTML contents of the first element in the selection
Html() (string, error)
// Text returns the combined text contents of all matched elements
Text() string
// Attr returns the value of the specified attribute for the first element
Attr(name string) (string, bool)
// Each runs the given function on each element in the selection
Each(func(int, Selection))
// Length returns the number of elements in the selection
Length() int
}
Selection represents a set of matched nodes
Click to show internal directories.
Click to hide internal directories.