예제 #1
0
func (xmlNode *XmlNode) Path() (path string) {
	pathPtr := C.xmlGetNodePath(xmlNode.Ptr)
	if pathPtr != nil {
		p := (*C.char)(unsafe.Pointer(pathPtr))
		defer C.xmlFreeChars(p)
		path = C.GoString(p)
	}
	return
}
예제 #2
0
// xmlGetNodePath
func (node *Node) Path() string {
	cstr := C.xmlGetNodePath(node.Ptr)
	defer C.free_xmlstring(cstr)
	return C.GoString(C.to_charptr(cstr))
}