Documentation ¶
Index ¶
- func Marshal(n tree.Node, w io.Writer) error
- func MarshalStr(n tree.Node) (string, error)
- func ParseExec(xpstr string, t tree.Node, opts ...FuncOpts) (tree.Result, error)
- type FuncOpts
- type Opts
- type XPathExec
- func (xp XPathExec) Exec(t tree.Node, opts ...FuncOpts) (tree.Result, error)
- func (xp XPathExec) ExecBool(t tree.Node, opts ...FuncOpts) (bool, error)
- func (xp XPathExec) ExecNode(t tree.Node, opts ...FuncOpts) (tree.NodeSet, error)
- func (xp XPathExec) ExecNum(t tree.Node, opts ...FuncOpts) (float64, error)
- func (xp XPathExec) MustExec(t tree.Node, opts ...FuncOpts) tree.Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalStr ¶
MarshalStr is like Marhal, but returns a string.
Types ¶
type XPathExec ¶
type XPathExec struct {
// contains filtered or unexported fields
}
XPathExec is the XPath executor, compiled from an XPath string
func (XPathExec) Exec ¶
Exec executes the XPath expression, xp, against the tree, t, with the namespace mappings, ns, and returns the result as a stringer.
func (XPathExec) ExecBool ¶
ExecBool is like Exec, except it will attempt to convert the result to its boolean value.
func (XPathExec) ExecNode ¶
ExecNode is like Exec, except it will attempt to return the result as a node-set.
Click to show internal directories.
Click to hide internal directories.