func (x *Object) Free() {
	clib.XMLXPathFreeObject(x)
}
Free releases the underlying C structs
package xpath
import (
	"fmt"
	"github.com/lestrrat-go/libxml2/clib"
	"github.com/lestrrat-go/libxml2/types"
	"github.com/pkg/errors"
)
func (x Object) Pointer() uintptr {
	return x.ptr
}
func (x Object) Type() clib.XPathObjectType {
	return clib.XPathObjectType(clib.XMLXPathObjectType(x))
}
func (x Object) Number() float64 {
	return clib.XMLXPathObjectFloat64(x)
}
func (x Object) Bool() bool {
	return clib.XMLXPathObjectBool(x)
}
var WrapNodeFunc func(uintptr) (types.Node, error)
func (x Object) NodeList() types.NodeList {
	if WrapNodeFunc == nil {
		panic("WarapNodeFunc not initialized. read XXX for details")
	}
	nl, err := clib.XMLXPathObjectNodeList(x)
	if err != nil {
		return nil
	}
	ret := make([]types.Node, len(nl))
	for i, p := range nl {
		n, err := WrapNodeFunc(p)
		if err != nil {
			return nil
		}
		ret[i] = n
	}
	return ret
}
func (x Object) NodeIter() types.NodeIter {
	nl, err := clib.XMLXPathObjectNodeList(x)
	if err != nil {
		return NewNodeIterator(nil)
	}
	return NewNodeIterator(nl)
}
func (x Object) String() string {
	switch x.Type() {
	case NodeSetType:
		nl := x.NodeList()
		if nl == nil {
			return ""
		}
		if x.ForceLiteral {
			s, err := nl.Literal()
			if err == nil {
				return s
			}
			return ""
		}
		return nl.NodeValue()
	default:
		return fmt.Sprintf("%T", x)
	}
}