Example #1
0
func htmlReadDoc(content, url, encoding string, opts int) *C.xmlDoc {
	return C.htmlReadDoc(
		C.xmlCharStrdup(C.CString(content)),
		C.CString(url),
		C.CString(encoding),
		C.int(opts),
	)
}
Example #2
0
func HtmlEntityLookup(name string) *C.htmlEntityDesc {
	c := C.xmlCharStrdup(C.CString(name))
	return C.htmlEntityLookup(c)
}
Example #3
0
func HtmlTagLookup(name string) *C.htmlElemDesc {
	c := C.xmlCharStrdup(C.CString(name))
	return C.htmlTagLookup(c)
}
Example #4
0
func XmlGetProp(n *C.xmlNode, name string) string {
	c := C.xmlCharStrdup(C.CString(name))
	s := C.xmlGetProp(n, c)
	return xmlCharToString(s)
}
Example #5
0
func HtmlReadDoc(content string, url string, encoding string, opts int) *C.xmlDoc {
	c := C.xmlCharStrdup(C.CString(content))
	return C.htmlReadDoc(c, C.CString(url), C.CString(encoding), C.int(opts))
}
Example #6
0
func stringToXmlChar(s string) *C.xmlChar {
	cstr := C.CString(s)
	defer freeCString(cstr)
	c := C.xmlCharStrdup(cstr)
	return c
}