Beispiel #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),
	)
}
Beispiel #2
0
// htmlReadDoc
func ReadHTMLDoc(cur string, url string, encoding string, options HTMLParserOption) *HTMLDocument {
	ptrc := C.CString(cur)
	defer C.free_string(ptrc)
	ptru := C.CString(url)
	defer C.free_string(ptru)
	ptre := C.CString(encoding)
	defer C.free_string(ptre)
	doc := C.htmlReadDoc(C.to_xmlcharptr(ptrc), ptru, ptre, C.int(options))
	return makeHTMLDoc(doc)
}
Beispiel #3
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))
}