func (n *XMLNode) Find(expr string) (types.XPathResult, error) {
	ctx, err := xpath.NewContext(n)
	if err != nil {
		return nil, errors.Wrap(err, "failed to create new XPath context")
	}
	defer ctx.Free()
	return ctx.Find(expr)
}
Find evaluates the xpath expression and returns the matching nodes
package dom
import (
	"github.com/lestrrat-go/libxml2/clib"
	"github.com/lestrrat-go/libxml2/types"
	"github.com/lestrrat-go/libxml2/xpath"
	"github.com/pkg/errors"
)
func (n *XMLNode) ChildNodes() (types.NodeList, error) {
	list, err := clib.XMLChildNodes(n)
	if err != nil {
		return nil, errors.Wrap(err, "failed to get child node pointers")
	}
	ret := make(types.NodeList, len(list))
	for i, x := range list {
		ret[i], err = WrapNode(x)
		if err != nil {
			return nil, errors.Wrap(err, "failed to wrap node pointer")
		}
	}
	return ret, nil
}
func (n *XMLNode) RemoveChild(t types.Node) error {
	return clib.XMLRemoveChild(n, t)
}
func (n *XMLNode) Pointer() uintptr {
	return n.ptr
}
func (n *XMLNode) String() string {
	return n.ToString(0, false)
}
func (n *XMLNode) OwnerDocument() (types.Document, error) {
	ptr, err := clib.XMLOwnerDocument(n)
	if err != nil {
		return nil, errors.Wrap(err, "failed to get valid owner document")
	}
	if ptr == 0 {
		return nil, errors.Wrap(clib.ErrInvalidDocument, "failed to get valid owner document")
	}
	return WrapDocument(ptr), nil
}
func (n *XMLNode) NodeName() string {
	s, err := clib.XMLNodeName(n)
	if err != nil {
		return ""
	}
	return s
}
func (n *XMLNode) NodeValue() string {
	s, err := clib.XMLNodeValue(n)
	if err != nil {
		return ""
	}
	return s
}
func (n XMLNode) Literal() (string, error) {
	return n.String(), nil
}
func (n *XMLNode) IsSameNode(other types.Node) bool {
	return n.Pointer() == other.Pointer()
}
func (n *XMLNode) Copy() (types.Node, error) {
	doc, err := n.OwnerDocument()
	if err != nil {
		return nil, errors.Wrap(err, "failed to get owner document")
	}
	nptr, err := clib.XMLDocCopyNode(n, doc, 1)
	if err != nil {
		return nil, errors.Wrap(err, "failed to copy document nodes")
	}
	return WrapNode(nptr)
}
func (n *XMLNode) SetDocument(d types.Document) error {
	return clib.XMLSetTreeDoc(n, d)
}
func (n *XMLNode) ParseInContext(s string, o int) (types.Node, error) {
	nptr, err := clib.XMLParseInNodeContext(n, s, o)
	if err != nil {
		return nil, errors.Wrap(err, "failed to parse input")
	}
	return WrapNode(nptr)
}