Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotExists = errors.New("not exist") ErrInvalidQuery = errors.New("invalid query") )
Functions ¶
func GetCurrentNodeFromNavigator ¶
func GetCurrentNodeFromNavigator(n *htmlquery.NodeNavigator) *html.Node
func HTMLNodeToBytes ¶
Types ¶
type Document ¶
type Document interface { Value() interface{} FindOne(expr string) (Document, error) FindAll(expr string) []Document }
Document can be HTML, JSON, XML, etc.
type HTMLXpathDoc ¶
type HTMLXpathDoc struct {
// contains filtered or unexported fields
}
func NewHTMLXpath ¶
func NewHTMLXpath(data []byte) (*HTMLXpathDoc, error)
func (*HTMLXpathDoc) FindAll ¶
func (d *HTMLXpathDoc) FindAll(expr string) []Document
func (*HTMLXpathDoc) Value ¶
func (d *HTMLXpathDoc) Value() interface{}
type JSONXpathDoc ¶
type JSONXpathDoc struct {
// contains filtered or unexported fields
}
func NewJSONXpath ¶
func NewJSONXpath(data []byte) (*JSONXpathDoc, error)
func (*JSONXpathDoc) FindAll ¶
func (d *JSONXpathDoc) FindAll(expr string) []Document
func (*JSONXpathDoc) Value ¶
func (d *JSONXpathDoc) Value() interface{}
type XMLXpathDoc ¶
type XMLXpathDoc struct {
// contains filtered or unexported fields
}
func NewXMLXpath ¶
func NewXMLXpath(data []byte) (*XMLXpathDoc, error)
func (*XMLXpathDoc) FindAll ¶
func (d *XMLXpathDoc) FindAll(expr string) []Document
func (*XMLXpathDoc) Value ¶
func (d *XMLXpathDoc) Value() interface{}
Click to show internal directories.
Click to hide internal directories.