示例#1
0
// xmlXPathCastToNumber
func (obj *XPathObject) CastToNumber() float32 {
	cdbl := C.xmlXPathCastToNumber(obj.Ptr)
	return float32(cdbl)
}
示例#2
0
func (r *XPathResult) Number() float64 {
	if r.Type() != XPATH_NUMBER {
		panic("libxml: Not a number")
	}
	return float64(C.xmlXPathCastToNumber(r.ptr))
}