comparison env/lib/python3.7/site-packages/lxml/includes/tree.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 cimport stdio
2 from libc.string cimport const_char, const_uchar
3
4 cdef extern from "lxml-version.h":
5 # deprecated declaration, use etreepublic.pxd instead
6 cdef char* LXML_VERSION_STRING
7
8 cdef extern from "libxml/xmlversion.h":
9 cdef const_char* xmlParserVersion
10 cdef int LIBXML_VERSION
11
12 cdef extern from "libxml/xmlstring.h":
13 ctypedef unsigned char xmlChar
14 ctypedef const xmlChar const_xmlChar "const xmlChar"
15 cdef int xmlStrlen(const_xmlChar* str) nogil
16 cdef xmlChar* xmlStrdup(const_xmlChar* cur) nogil
17 cdef int xmlStrncmp(const_xmlChar* str1, const_xmlChar* str2, int length) nogil
18 cdef int xmlStrcmp(const_xmlChar* str1, const_xmlChar* str2) nogil
19 cdef int xmlStrcasecmp(const xmlChar *str1, const xmlChar *str2) nogil
20 cdef const_xmlChar* xmlStrstr(const_xmlChar* str1, const_xmlChar* str2) nogil
21 cdef const_xmlChar* xmlStrchr(const_xmlChar* str1, xmlChar ch) nogil
22 cdef const_xmlChar* _xcstr "(const xmlChar*)PyBytes_AS_STRING" (object s)
23
24 cdef extern from "libxml/encoding.h":
25 ctypedef enum xmlCharEncoding:
26 XML_CHAR_ENCODING_ERROR = -1 # No char encoding detected
27 XML_CHAR_ENCODING_NONE = 0 # No char encoding detected
28 XML_CHAR_ENCODING_UTF8 = 1 # UTF-8
29 XML_CHAR_ENCODING_UTF16LE = 2 # UTF-16 little endian
30 XML_CHAR_ENCODING_UTF16BE = 3 # UTF-16 big endian
31 XML_CHAR_ENCODING_UCS4LE = 4 # UCS-4 little endian
32 XML_CHAR_ENCODING_UCS4BE = 5 # UCS-4 big endian
33 XML_CHAR_ENCODING_EBCDIC = 6 # EBCDIC uh!
34 XML_CHAR_ENCODING_UCS4_2143 = 7 # UCS-4 unusual ordering
35 XML_CHAR_ENCODING_UCS4_3412 = 8 # UCS-4 unusual ordering
36 XML_CHAR_ENCODING_UCS2 = 9 # UCS-2
37 XML_CHAR_ENCODING_8859_1 = 10 # ISO-8859-1 ISO Latin 1
38 XML_CHAR_ENCODING_8859_2 = 11 # ISO-8859-2 ISO Latin 2
39 XML_CHAR_ENCODING_8859_3 = 12 # ISO-8859-3
40 XML_CHAR_ENCODING_8859_4 = 13 # ISO-8859-4
41 XML_CHAR_ENCODING_8859_5 = 14 # ISO-8859-5
42 XML_CHAR_ENCODING_8859_6 = 15 # ISO-8859-6
43 XML_CHAR_ENCODING_8859_7 = 16 # ISO-8859-7
44 XML_CHAR_ENCODING_8859_8 = 17 # ISO-8859-8
45 XML_CHAR_ENCODING_8859_9 = 18 # ISO-8859-9
46 XML_CHAR_ENCODING_2022_JP = 19 # ISO-2022-JP
47 XML_CHAR_ENCODING_SHIFT_JIS = 20 # Shift_JIS
48 XML_CHAR_ENCODING_EUC_JP = 21 # EUC-JP
49 XML_CHAR_ENCODING_ASCII = 22 # pure ASCII
50
51 ctypedef struct xmlCharEncodingHandler
52 cdef xmlCharEncodingHandler* xmlFindCharEncodingHandler(char* name) nogil
53 cdef xmlCharEncodingHandler* xmlGetCharEncodingHandler(
54 xmlCharEncoding enc) nogil
55 cdef int xmlCharEncCloseFunc(xmlCharEncodingHandler* handler) nogil
56 cdef xmlCharEncoding xmlDetectCharEncoding(const_xmlChar* text, int len) nogil
57 cdef const_char* xmlGetCharEncodingName(xmlCharEncoding enc) nogil
58 cdef xmlCharEncoding xmlParseCharEncoding(char* name) nogil
59 ctypedef int (*xmlCharEncodingOutputFunc)(
60 unsigned char *out_buf, int *outlen, const_uchar *in_buf, int *inlen)
61
62 cdef extern from "libxml/chvalid.h":
63 cdef int xmlIsChar_ch(char c) nogil
64 cdef int xmlIsCharQ(int ch) nogil
65
66 cdef extern from "libxml/hash.h":
67 ctypedef struct xmlHashTable
68 ctypedef void (*xmlHashScanner)(void* payload, void* data, const_xmlChar* name) # may require GIL!
69 void xmlHashScan(xmlHashTable* table, xmlHashScanner f, void* data) nogil
70 void* xmlHashLookup(xmlHashTable* table, const_xmlChar* name) nogil
71 ctypedef void (*xmlHashDeallocator)(void *payload, xmlChar *name)
72 cdef xmlHashTable* xmlHashCreate(int size)
73 cdef xmlHashTable* xmlHashCreateDict(int size, xmlDict *dict)
74 cdef int xmlHashSize(xmlHashTable* table)
75 cdef void xmlHashFree(xmlHashTable* table, xmlHashDeallocator f)
76
77 cdef extern from *: # actually "libxml/dict.h"
78 # libxml/dict.h appears to be broken to include in C
79 ctypedef struct xmlDict
80 cdef const_xmlChar* xmlDictLookup(xmlDict* dict, const_xmlChar* name, int len) nogil
81 cdef const_xmlChar* xmlDictExists(xmlDict* dict, const_xmlChar* name, int len) nogil
82 cdef int xmlDictOwns(xmlDict* dict, const_xmlChar* name) nogil
83 cdef size_t xmlDictSize(xmlDict* dict) nogil
84
85 cdef extern from "libxml/tree.h":
86 ctypedef struct xmlDoc
87 ctypedef struct xmlAttr
88 ctypedef struct xmlNotationTable
89
90 ctypedef enum xmlElementType:
91 XML_ELEMENT_NODE= 1
92 XML_ATTRIBUTE_NODE= 2
93 XML_TEXT_NODE= 3
94 XML_CDATA_SECTION_NODE= 4
95 XML_ENTITY_REF_NODE= 5
96 XML_ENTITY_NODE= 6
97 XML_PI_NODE= 7
98 XML_COMMENT_NODE= 8
99 XML_DOCUMENT_NODE= 9
100 XML_DOCUMENT_TYPE_NODE= 10
101 XML_DOCUMENT_FRAG_NODE= 11
102 XML_NOTATION_NODE= 12
103 XML_HTML_DOCUMENT_NODE= 13
104 XML_DTD_NODE= 14
105 XML_ELEMENT_DECL= 15
106 XML_ATTRIBUTE_DECL= 16
107 XML_ENTITY_DECL= 17
108 XML_NAMESPACE_DECL= 18
109 XML_XINCLUDE_START= 19
110 XML_XINCLUDE_END= 20
111
112 ctypedef enum xmlElementTypeVal:
113 XML_ELEMENT_TYPE_UNDEFINED= 0
114 XML_ELEMENT_TYPE_EMPTY= 1
115 XML_ELEMENT_TYPE_ANY= 2
116 XML_ELEMENT_TYPE_MIXED= 3
117 XML_ELEMENT_TYPE_ELEMENT= 4
118
119 ctypedef enum xmlElementContentType:
120 XML_ELEMENT_CONTENT_PCDATA= 1
121 XML_ELEMENT_CONTENT_ELEMENT= 2
122 XML_ELEMENT_CONTENT_SEQ= 3
123 XML_ELEMENT_CONTENT_OR= 4
124
125 ctypedef enum xmlElementContentOccur:
126 XML_ELEMENT_CONTENT_ONCE= 1
127 XML_ELEMENT_CONTENT_OPT= 2
128 XML_ELEMENT_CONTENT_MULT= 3
129 XML_ELEMENT_CONTENT_PLUS= 4
130
131 ctypedef enum xmlAttributeType:
132 XML_ATTRIBUTE_CDATA = 1
133 XML_ATTRIBUTE_ID= 2
134 XML_ATTRIBUTE_IDREF= 3
135 XML_ATTRIBUTE_IDREFS= 4
136 XML_ATTRIBUTE_ENTITY= 5
137 XML_ATTRIBUTE_ENTITIES= 6
138 XML_ATTRIBUTE_NMTOKEN= 7
139 XML_ATTRIBUTE_NMTOKENS= 8
140 XML_ATTRIBUTE_ENUMERATION= 9
141 XML_ATTRIBUTE_NOTATION= 10
142
143 ctypedef enum xmlAttributeDefault:
144 XML_ATTRIBUTE_NONE= 1
145 XML_ATTRIBUTE_REQUIRED= 2
146 XML_ATTRIBUTE_IMPLIED= 3
147 XML_ATTRIBUTE_FIXED= 4
148
149 ctypedef enum xmlEntityType:
150 XML_INTERNAL_GENERAL_ENTITY= 1
151 XML_EXTERNAL_GENERAL_PARSED_ENTITY= 2
152 XML_EXTERNAL_GENERAL_UNPARSED_ENTITY= 3
153 XML_INTERNAL_PARAMETER_ENTITY= 4
154 XML_EXTERNAL_PARAMETER_ENTITY= 5
155 XML_INTERNAL_PREDEFINED_ENTITY= 6
156
157 ctypedef struct xmlNs:
158 const_xmlChar* href
159 const_xmlChar* prefix
160 xmlNs* next
161
162 ctypedef struct xmlNode:
163 void* _private
164 xmlElementType type
165 const_xmlChar* name
166 xmlNode* children
167 xmlNode* last
168 xmlNode* parent
169 xmlNode* next
170 xmlNode* prev
171 xmlDoc* doc
172 xmlChar* content
173 xmlAttr* properties
174 xmlNs* ns
175 xmlNs* nsDef
176 unsigned short line
177
178 ctypedef struct xmlElementContent:
179 xmlElementContentType type
180 xmlElementContentOccur ocur
181 const_xmlChar *name
182 xmlElementContent *c1
183 xmlElementContent *c2
184 xmlElementContent *parent
185 const_xmlChar *prefix
186
187 ctypedef struct xmlEnumeration:
188 xmlEnumeration *next
189 const_xmlChar *name
190
191 ctypedef struct xmlAttribute:
192 void* _private
193 xmlElementType type
194 const_xmlChar* name
195 xmlNode* children
196 xmlNode* last
197 xmlDtd* parent
198 xmlNode* next
199 xmlNode* prev
200 xmlDoc* doc
201 xmlAttribute* nexth
202 xmlAttributeType atype
203 xmlAttributeDefault def_ "def"
204 const_xmlChar* defaultValue
205 xmlEnumeration* tree
206 const_xmlChar* prefix
207 const_xmlChar* elem
208
209 ctypedef struct xmlElement:
210 void* _private
211 xmlElementType type
212 const_xmlChar* name
213 xmlNode* children
214 xmlNode* last
215 xmlNode* parent
216 xmlNode* next
217 xmlNode* prev
218 xmlDoc* doc
219 xmlElementTypeVal etype
220 xmlElementContent* content
221 xmlAttribute* attributes
222 const_xmlChar* prefix
223 void *contModel
224
225 ctypedef struct xmlEntity:
226 void* _private
227 xmlElementType type
228 const_xmlChar* name
229 xmlNode* children
230 xmlNode* last
231 xmlDtd* parent
232 xmlNode* next
233 xmlNode* prev
234 xmlDoc* doc
235 xmlChar* orig
236 xmlChar* content
237 int length
238 xmlEntityType etype
239 const_xmlChar* ExternalID
240 const_xmlChar* SystemID
241 xmlEntity* nexte
242 const_xmlChar* URI
243 int owner
244 int checked
245
246 ctypedef struct xmlDtd:
247 const_xmlChar* name
248 const_xmlChar* ExternalID
249 const_xmlChar* SystemID
250 void* notations
251 void* entities
252 void* pentities
253 void* attributes
254 void* elements
255 xmlNode* children
256 xmlNode* last
257 xmlDoc* doc
258
259 ctypedef struct xmlDoc:
260 xmlElementType type
261 char* name
262 xmlNode* children
263 xmlNode* last
264 xmlNode* parent
265 xmlNode* next
266 xmlNode* prev
267 xmlDoc* doc
268 xmlDict* dict
269 xmlHashTable* ids
270 int standalone
271 const_xmlChar* version
272 const_xmlChar* encoding
273 const_xmlChar* URL
274 void* _private
275 xmlDtd* intSubset
276 xmlDtd* extSubset
277
278 ctypedef struct xmlAttr:
279 void* _private
280 xmlElementType type
281 const_xmlChar* name
282 xmlNode* children
283 xmlNode* last
284 xmlNode* parent
285 xmlAttr* next
286 xmlAttr* prev
287 xmlDoc* doc
288 xmlNs* ns
289 xmlAttributeType atype
290
291 ctypedef struct xmlID:
292 const_xmlChar* value
293 const_xmlChar* name
294 xmlAttr* attr
295 xmlDoc* doc
296
297 ctypedef struct xmlBuffer
298
299 ctypedef struct xmlBuf # new in libxml2 2.9
300
301 ctypedef struct xmlOutputBuffer:
302 xmlBuf* buffer
303 xmlBuf* conv
304 int error
305
306 const_xmlChar* XML_XML_NAMESPACE
307
308 cdef void xmlFreeDoc(xmlDoc* cur) nogil
309 cdef void xmlFreeDtd(xmlDtd* cur) nogil
310 cdef void xmlFreeNode(xmlNode* cur) nogil
311 cdef void xmlFreeNsList(xmlNs* ns) nogil
312 cdef void xmlFreeNs(xmlNs* ns) nogil
313 cdef void xmlFree(void* buf) nogil
314
315 cdef xmlNode* xmlNewNode(xmlNs* ns, const_xmlChar* name) nogil
316 cdef xmlNode* xmlNewDocText(xmlDoc* doc, const_xmlChar* content) nogil
317 cdef xmlNode* xmlNewDocComment(xmlDoc* doc, const_xmlChar* content) nogil
318 cdef xmlNode* xmlNewDocPI(xmlDoc* doc, const_xmlChar* name, const_xmlChar* content) nogil
319 cdef xmlNode* xmlNewReference(xmlDoc* doc, const_xmlChar* name) nogil
320 cdef xmlNode* xmlNewCDataBlock(xmlDoc* doc, const_xmlChar* text, int len) nogil
321 cdef xmlNs* xmlNewNs(xmlNode* node, const_xmlChar* href, const_xmlChar* prefix) nogil
322 cdef xmlNode* xmlAddChild(xmlNode* parent, xmlNode* cur) nogil
323 cdef xmlNode* xmlReplaceNode(xmlNode* old, xmlNode* cur) nogil
324 cdef xmlNode* xmlAddPrevSibling(xmlNode* cur, xmlNode* elem) nogil
325 cdef xmlNode* xmlAddNextSibling(xmlNode* cur, xmlNode* elem) nogil
326 cdef xmlNode* xmlNewDocNode(xmlDoc* doc, xmlNs* ns,
327 const_xmlChar* name, const_xmlChar* content) nogil
328 cdef xmlDoc* xmlNewDoc(const_xmlChar* version) nogil
329 cdef xmlAttr* xmlNewProp(xmlNode* node, const_xmlChar* name, const_xmlChar* value) nogil
330 cdef xmlAttr* xmlNewNsProp(xmlNode* node, xmlNs* ns,
331 const_xmlChar* name, const_xmlChar* value) nogil
332 cdef xmlChar* xmlGetNoNsProp(xmlNode* node, const_xmlChar* name) nogil
333 cdef xmlChar* xmlGetNsProp(xmlNode* node, const_xmlChar* name, const_xmlChar* nameSpace) nogil
334 cdef void xmlSetNs(xmlNode* node, xmlNs* ns) nogil
335 cdef xmlAttr* xmlSetProp(xmlNode* node, const_xmlChar* name, const_xmlChar* value) nogil
336 cdef xmlAttr* xmlSetNsProp(xmlNode* node, xmlNs* ns,
337 const_xmlChar* name, const_xmlChar* value) nogil
338 cdef int xmlRemoveID(xmlDoc* doc, xmlAttr* cur) nogil
339 cdef int xmlRemoveProp(xmlAttr* cur) nogil
340 cdef void xmlFreePropList(xmlAttr* cur) nogil
341 cdef xmlChar* xmlGetNodePath(xmlNode* node) nogil
342 cdef void xmlDocDumpMemory(xmlDoc* cur, char** mem, int* size) nogil
343 cdef void xmlDocDumpMemoryEnc(xmlDoc* cur, char** mem, int* size,
344 char* encoding) nogil
345 cdef int xmlSaveFileTo(xmlOutputBuffer* out, xmlDoc* cur,
346 char* encoding) nogil
347
348 cdef void xmlUnlinkNode(xmlNode* cur) nogil
349 cdef xmlNode* xmlDocSetRootElement(xmlDoc* doc, xmlNode* root) nogil
350 cdef xmlNode* xmlDocGetRootElement(xmlDoc* doc) nogil
351 cdef void xmlSetTreeDoc(xmlNode* tree, xmlDoc* doc) nogil
352 cdef xmlAttr* xmlHasProp(xmlNode* node, const_xmlChar* name) nogil
353 cdef xmlAttr* xmlHasNsProp(xmlNode* node, const_xmlChar* name, const_xmlChar* nameSpace) nogil
354 cdef xmlChar* xmlNodeGetContent(xmlNode* cur) nogil
355 cdef int xmlNodeBufGetContent(xmlBuffer* buffer, xmlNode* cur) nogil
356 cdef xmlNs* xmlSearchNs(xmlDoc* doc, xmlNode* node, const_xmlChar* prefix) nogil
357 cdef xmlNs* xmlSearchNsByHref(xmlDoc* doc, xmlNode* node, const_xmlChar* href) nogil
358 cdef int xmlIsBlankNode(xmlNode* node) nogil
359 cdef long xmlGetLineNo(xmlNode* node) nogil
360 cdef void xmlElemDump(stdio.FILE* f, xmlDoc* doc, xmlNode* cur) nogil
361 cdef void xmlNodeDumpOutput(xmlOutputBuffer* buf,
362 xmlDoc* doc, xmlNode* cur, int level,
363 int format, const_char* encoding) nogil
364 cdef void xmlBufAttrSerializeTxtContent(xmlOutputBuffer *buf, xmlDoc *doc,
365 xmlAttr *attr, const_xmlChar *string) nogil
366 cdef void xmlNodeSetName(xmlNode* cur, const_xmlChar* name) nogil
367 cdef void xmlNodeSetContent(xmlNode* cur, const_xmlChar* content) nogil
368 cdef xmlDtd* xmlCopyDtd(xmlDtd* dtd) nogil
369 cdef xmlDoc* xmlCopyDoc(xmlDoc* doc, int recursive) nogil
370 cdef xmlNode* xmlCopyNode(xmlNode* node, int extended) nogil
371 cdef xmlNode* xmlDocCopyNode(xmlNode* node, xmlDoc* doc, int extended) nogil
372 cdef int xmlReconciliateNs(xmlDoc* doc, xmlNode* tree) nogil
373 cdef xmlNs* xmlNewReconciliedNs(xmlDoc* doc, xmlNode* tree, xmlNs* ns) nogil
374 cdef xmlBuffer* xmlBufferCreate() nogil
375 cdef void xmlBufferWriteChar(xmlBuffer* buf, char* string) nogil
376 cdef void xmlBufferFree(xmlBuffer* buf) nogil
377 cdef const_xmlChar* xmlBufferContent(xmlBuffer* buf) nogil
378 cdef int xmlBufferLength(xmlBuffer* buf) nogil
379 cdef const_xmlChar* xmlBufContent(xmlBuf* buf) nogil # new in libxml2 2.9
380 cdef size_t xmlBufUse(xmlBuf* buf) nogil # new in libxml2 2.9
381 cdef int xmlKeepBlanksDefault(int val) nogil
382 cdef xmlChar* xmlNodeGetBase(xmlDoc* doc, xmlNode* node) nogil
383 cdef xmlDtd* xmlCreateIntSubset(xmlDoc* doc, const_xmlChar* name,
384 const_xmlChar* ExternalID, const_xmlChar* SystemID) nogil
385 cdef void xmlNodeSetBase(xmlNode* node, const_xmlChar* uri) nogil
386 cdef int xmlValidateNCName(const_xmlChar* value, int space) nogil
387
388 cdef extern from "libxml/uri.h":
389 cdef const_xmlChar* xmlBuildURI(const_xmlChar* href, const_xmlChar* base) nogil
390
391 cdef extern from "libxml/HTMLtree.h":
392 cdef void htmlNodeDumpFormatOutput(xmlOutputBuffer* buf,
393 xmlDoc* doc, xmlNode* cur,
394 char* encoding, int format) nogil
395 cdef xmlDoc* htmlNewDoc(const_xmlChar* uri, const_xmlChar* externalID) nogil
396
397 cdef extern from "libxml/valid.h":
398 cdef xmlAttr* xmlGetID(xmlDoc* doc, const_xmlChar* ID) nogil
399 cdef void xmlDumpNotationTable(xmlBuffer* buffer,
400 xmlNotationTable* table) nogil
401 cdef int xmlValidateNameValue(const_xmlChar* value) nogil
402
403 cdef extern from "libxml/xmlIO.h":
404 cdef int xmlOutputBufferWrite(xmlOutputBuffer* out,
405 int len, const_char* str) nogil
406 cdef int xmlOutputBufferWriteString(xmlOutputBuffer* out, const_char* str) nogil
407 cdef int xmlOutputBufferWriteEscape(xmlOutputBuffer* out,
408 const_xmlChar* str,
409 xmlCharEncodingOutputFunc escapefunc) nogil
410 cdef int xmlOutputBufferFlush(xmlOutputBuffer* out) nogil
411 cdef int xmlOutputBufferClose(xmlOutputBuffer* out) nogil
412
413 ctypedef int (*xmlInputReadCallback)(void* context,
414 char* buffer, int len)
415 ctypedef int (*xmlInputCloseCallback)(void* context)
416
417 ctypedef int (*xmlOutputWriteCallback)(void* context,
418 char* buffer, int len)
419 ctypedef int (*xmlOutputCloseCallback)(void* context)
420
421 cdef xmlOutputBuffer* xmlAllocOutputBuffer(
422 xmlCharEncodingHandler* encoder) nogil
423 cdef xmlOutputBuffer* xmlOutputBufferCreateIO(
424 xmlOutputWriteCallback iowrite,
425 xmlOutputCloseCallback ioclose,
426 void * ioctx,
427 xmlCharEncodingHandler* encoder) nogil
428 cdef xmlOutputBuffer* xmlOutputBufferCreateFile(
429 stdio.FILE* file, xmlCharEncodingHandler* encoder) nogil
430 cdef xmlOutputBuffer* xmlOutputBufferCreateFilename(
431 char* URI, xmlCharEncodingHandler* encoder, int compression) nogil
432
433 cdef extern from "libxml/xmlsave.h":
434 ctypedef struct xmlSaveCtxt
435
436 ctypedef enum xmlSaveOption:
437 XML_SAVE_FORMAT = 1 # format save output (2.6.17)
438 XML_SAVE_NO_DECL = 2 # drop the xml declaration (2.6.21)
439 XML_SAVE_NO_EMPTY = 4 # no empty tags (2.6.22)
440 XML_SAVE_NO_XHTML = 8 # disable XHTML1 specific rules (2.6.22)
441 XML_SAVE_XHTML = 16 # force XHTML1 specific rules (2.7.2)
442 XML_SAVE_AS_XML = 32 # force XML serialization on HTML doc (2.7.2)
443 XML_SAVE_AS_HTML = 64 # force HTML serialization on XML doc (2.7.2)
444
445 cdef xmlSaveCtxt* xmlSaveToFilename(char* filename, char* encoding,
446 int options) nogil
447 cdef xmlSaveCtxt* xmlSaveToBuffer(xmlBuffer* buffer, char* encoding,
448 int options) nogil # libxml2 2.6.23
449 cdef long xmlSaveDoc(xmlSaveCtxt* ctxt, xmlDoc* doc) nogil
450 cdef long xmlSaveTree(xmlSaveCtxt* ctxt, xmlNode* node) nogil
451 cdef int xmlSaveClose(xmlSaveCtxt* ctxt) nogil
452 cdef int xmlSaveFlush(xmlSaveCtxt* ctxt) nogil
453 cdef int xmlSaveSetAttrEscape(xmlSaveCtxt* ctxt, void* escape_func) nogil
454 cdef int xmlSaveSetEscape(xmlSaveCtxt* ctxt, void* escape_func) nogil
455
456 cdef extern from "libxml/globals.h":
457 cdef int xmlThrDefKeepBlanksDefaultValue(int onoff) nogil
458 cdef int xmlThrDefLineNumbersDefaultValue(int onoff) nogil
459 cdef int xmlThrDefIndentTreeOutput(int onoff) nogil
460
461 cdef extern from "libxml/xmlmemory.h" nogil:
462 cdef void* xmlMalloc(size_t size)
463 cdef int xmlMemBlocks()
464 cdef int xmlMemUsed()
465 cdef void xmlMemDisplay(stdio.FILE* file)
466 cdef void xmlMemDisplayLast(stdio.FILE* file, long num_bytes)
467 cdef void xmlMemShow(stdio.FILE* file, int count)
468
469 cdef extern from "etree_defs.h":
470 cdef bint _isElement(xmlNode* node) nogil
471 cdef bint _isElementOrXInclude(xmlNode* node) nogil
472 cdef const_xmlChar* _getNs(xmlNode* node) nogil
473 cdef void BEGIN_FOR_EACH_ELEMENT_FROM(xmlNode* tree_top,
474 xmlNode* start_node,
475 bint inclusive) nogil
476 cdef void END_FOR_EACH_ELEMENT_FROM(xmlNode* start_node) nogil
477 cdef void BEGIN_FOR_EACH_FROM(xmlNode* tree_top,
478 xmlNode* start_node,
479 bint inclusive) nogil
480 cdef void END_FOR_EACH_FROM(xmlNode* start_node) nogil