Documentation ¶
Index ¶
- Variables
- type NodeNavigator
- func (h *NodeNavigator) Copy() AXpath.NodeNavigator
- func (h *NodeNavigator) Current() *html.Node
- func (h *NodeNavigator) LocalName() string
- func (h *NodeNavigator) MoveTo(other AXpath.NodeNavigator) bool
- func (h *NodeNavigator) MoveToChild() bool
- func (h *NodeNavigator) MoveToFirst() bool
- func (h *NodeNavigator) MoveToNext() bool
- func (h *NodeNavigator) MoveToNextAttribute() bool
- func (h *NodeNavigator) MoveToParent() bool
- func (h *NodeNavigator) MoveToPrevious() bool
- func (h *NodeNavigator) MoveToRoot()
- func (h *NodeNavigator) NodeType() AXpath.NodeType
- func (*NodeNavigator) Prefix() string
- func (h *NodeNavigator) String() string
- func (h *NodeNavigator) Value() string
- type XpathNode
- func (x *XpathNode) ExistsAttr(name string) bool
- func (x *XpathNode) Find(expr string) []*XpathNode
- func (x *XpathNode) FindOne(expr string) *XpathNode
- func (x *XpathNode) HTML(self bool) string
- func (x *XpathNode) Query(expr string) (*XpathNode, error)
- func (x *XpathNode) QueryAll(expr string) ([]*XpathNode, error)
- func (x *XpathNode) QuerySelector(selector *AXpath.Expr) *XpathNode
- func (x *XpathNode) QuerySelectorAll(selector *AXpath.Expr) []*XpathNode
- func (x *XpathNode) SelectAttr(name string) (val string)
- func (x *XpathNode) Text() string
Constants ¶
This section is empty.
Variables ¶
View Source
var DisableSelectorCache = false
View Source
var SelectorCacheMaxEntries = 50
Functions ¶
This section is empty.
Types ¶
type NodeNavigator ¶
type NodeNavigator struct {
// contains filtered or unexported fields
}
func CreateXPathNavigator ¶
func CreateXPathNavigator(top *html.Node) *NodeNavigator
func (*NodeNavigator) Copy ¶
func (h *NodeNavigator) Copy() AXpath.NodeNavigator
func (*NodeNavigator) Current ¶
func (h *NodeNavigator) Current() *html.Node
func (*NodeNavigator) LocalName ¶
func (h *NodeNavigator) LocalName() string
func (*NodeNavigator) MoveTo ¶
func (h *NodeNavigator) MoveTo(other AXpath.NodeNavigator) bool
func (*NodeNavigator) MoveToChild ¶
func (h *NodeNavigator) MoveToChild() bool
func (*NodeNavigator) MoveToFirst ¶
func (h *NodeNavigator) MoveToFirst() bool
func (*NodeNavigator) MoveToNext ¶
func (h *NodeNavigator) MoveToNext() bool
func (*NodeNavigator) MoveToNextAttribute ¶
func (h *NodeNavigator) MoveToNextAttribute() bool
func (*NodeNavigator) MoveToParent ¶
func (h *NodeNavigator) MoveToParent() bool
func (*NodeNavigator) MoveToPrevious ¶
func (h *NodeNavigator) MoveToPrevious() bool
func (*NodeNavigator) MoveToRoot ¶
func (h *NodeNavigator) MoveToRoot()
func (*NodeNavigator) NodeType ¶
func (h *NodeNavigator) NodeType() AXpath.NodeType
func (*NodeNavigator) Prefix ¶
func (*NodeNavigator) Prefix() string
func (*NodeNavigator) String ¶
func (h *NodeNavigator) String() string
func (*NodeNavigator) Value ¶
func (h *NodeNavigator) Value() string
type XpathNode ¶
func XpathParser ¶
func (*XpathNode) ExistsAttr ¶
ExistsAttr returns whether attribute with specified name exists.
func (*XpathNode) QuerySelector ¶
QuerySelector returns the first matched html.Node by the specified XPath selector.
func (*XpathNode) QuerySelectorAll ¶
func (*XpathNode) SelectAttr ¶
Click to show internal directories.
Click to hide internal directories.