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