comparison env/lib/python3.7/site-packages/lxml/includes/htmlparser.pxd @ 0:26e78fe6e8c4 draft

"planemo upload commit c699937486c35866861690329de38ec1a5d9f783"
author shellac
date Sat, 02 May 2020 07:14:21 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:26e78fe6e8c4
1 from libc.string cimport const_char
2
3 from lxml.includes.tree cimport xmlDoc
4 from lxml.includes.tree cimport xmlInputReadCallback, xmlInputCloseCallback
5 from lxml.includes.xmlparser cimport xmlParserCtxt, xmlSAXHandler, xmlSAXHandlerV1
6
7 cdef extern from "libxml/HTMLparser.h":
8 ctypedef enum htmlParserOption:
9 HTML_PARSE_NOERROR # suppress error reports
10 HTML_PARSE_NOWARNING # suppress warning reports
11 HTML_PARSE_PEDANTIC # pedantic error reporting
12 HTML_PARSE_NOBLANKS # remove blank nodes
13 HTML_PARSE_NONET # Forbid network access
14 # libxml2 2.6.21+ only:
15 HTML_PARSE_RECOVER # Relaxed parsing
16 HTML_PARSE_COMPACT # compact small text nodes
17 # libxml2 2.7.7+ only:
18 HTML_PARSE_NOIMPLIED # Do not add implied html/body... elements
19 # libxml2 2.7.8+ only:
20 HTML_PARSE_NODEFDTD # do not default a doctype if not found
21 # libxml2 2.8.0+ only:
22 XML_PARSE_IGNORE_ENC # ignore internal document encoding hint
23
24 xmlSAXHandlerV1 htmlDefaultSAXHandler
25
26 cdef xmlParserCtxt* htmlCreateMemoryParserCtxt(
27 char* buffer, int size) nogil
28 cdef xmlParserCtxt* htmlCreateFileParserCtxt(
29 char* filename, char* encoding) nogil
30 cdef xmlParserCtxt* htmlCreatePushParserCtxt(xmlSAXHandler* sax,
31 void* user_data,
32 char* chunk, int size,
33 char* filename, int enc) nogil
34 cdef void htmlFreeParserCtxt(xmlParserCtxt* ctxt) nogil
35 cdef void htmlCtxtReset(xmlParserCtxt* ctxt) nogil
36 cdef int htmlCtxtUseOptions(xmlParserCtxt* ctxt, int options) nogil
37 cdef int htmlParseDocument(xmlParserCtxt* ctxt) nogil
38 cdef int htmlParseChunk(xmlParserCtxt* ctxt,
39 char* chunk, int size, int terminate) nogil
40
41 cdef xmlDoc* htmlCtxtReadFile(xmlParserCtxt* ctxt,
42 char* filename, const_char* encoding,
43 int options) nogil
44 cdef xmlDoc* htmlCtxtReadDoc(xmlParserCtxt* ctxt,
45 char* buffer, char* URL, const_char* encoding,
46 int options) nogil
47 cdef xmlDoc* htmlCtxtReadIO(xmlParserCtxt* ctxt,
48 xmlInputReadCallback ioread,
49 xmlInputCloseCallback ioclose,
50 void* ioctx,
51 char* URL, const_char* encoding,
52 int options) nogil
53 cdef xmlDoc* htmlCtxtReadMemory(xmlParserCtxt* ctxt,
54 char* buffer, int size,
55 char* filename, const_char* encoding,
56 int options) nogil