Пример #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),
	)
}
Пример #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)
}
Пример #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))
}