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)
	}
}
String returns the stringified value of the nodes included in
this Object. If the Object is anything other than a
NodeSet, then we fallback to using fmt.Sprintf to generate
some sort of readable output
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)
}