lxml 6.0.0__cp312-cp312-macosx_10_13_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. lxml/ElementInclude.py +244 -0
  2. lxml/__init__.py +22 -0
  3. lxml/_elementpath.cpython-312-darwin.so +0 -0
  4. lxml/_elementpath.py +343 -0
  5. lxml/apihelpers.pxi +1801 -0
  6. lxml/builder.cpython-312-darwin.so +0 -0
  7. lxml/builder.py +243 -0
  8. lxml/classlookup.pxi +580 -0
  9. lxml/cleanup.pxi +215 -0
  10. lxml/cssselect.py +101 -0
  11. lxml/debug.pxi +36 -0
  12. lxml/docloader.pxi +178 -0
  13. lxml/doctestcompare.py +488 -0
  14. lxml/dtd.pxi +479 -0
  15. lxml/etree.cpython-312-darwin.so +0 -0
  16. lxml/etree.h +244 -0
  17. lxml/etree.pyx +3853 -0
  18. lxml/etree_api.h +204 -0
  19. lxml/extensions.pxi +830 -0
  20. lxml/html/ElementSoup.py +10 -0
  21. lxml/html/__init__.py +1927 -0
  22. lxml/html/_diffcommand.py +86 -0
  23. lxml/html/_difflib.cpython-312-darwin.so +0 -0
  24. lxml/html/_difflib.py +2106 -0
  25. lxml/html/_html5builder.py +100 -0
  26. lxml/html/_setmixin.py +56 -0
  27. lxml/html/builder.py +173 -0
  28. lxml/html/clean.py +21 -0
  29. lxml/html/defs.py +135 -0
  30. lxml/html/diff.cpython-312-darwin.so +0 -0
  31. lxml/html/diff.py +972 -0
  32. lxml/html/formfill.py +299 -0
  33. lxml/html/html5parser.py +260 -0
  34. lxml/html/soupparser.py +314 -0
  35. lxml/html/usedoctest.py +13 -0
  36. lxml/includes/__init__.pxd +0 -0
  37. lxml/includes/__init__.py +0 -0
  38. lxml/includes/c14n.pxd +25 -0
  39. lxml/includes/config.pxd +3 -0
  40. lxml/includes/dtdvalid.pxd +18 -0
  41. lxml/includes/etree_defs.h +379 -0
  42. lxml/includes/etreepublic.pxd +237 -0
  43. lxml/includes/extlibs/__init__.py +0 -0
  44. lxml/includes/extlibs/libcharset.h +45 -0
  45. lxml/includes/extlibs/localcharset.h +137 -0
  46. lxml/includes/extlibs/zconf.h +543 -0
  47. lxml/includes/extlibs/zlib.h +1938 -0
  48. lxml/includes/htmlparser.pxd +56 -0
  49. lxml/includes/libexslt/__init__.py +0 -0
  50. lxml/includes/libexslt/exslt.h +108 -0
  51. lxml/includes/libexslt/exsltconfig.h +70 -0
  52. lxml/includes/libexslt/exsltexports.h +63 -0
  53. lxml/includes/libxml/HTMLparser.h +339 -0
  54. lxml/includes/libxml/HTMLtree.h +148 -0
  55. lxml/includes/libxml/SAX.h +18 -0
  56. lxml/includes/libxml/SAX2.h +170 -0
  57. lxml/includes/libxml/__init__.py +0 -0
  58. lxml/includes/libxml/c14n.h +115 -0
  59. lxml/includes/libxml/catalog.h +183 -0
  60. lxml/includes/libxml/chvalid.h +230 -0
  61. lxml/includes/libxml/debugXML.h +79 -0
  62. lxml/includes/libxml/dict.h +82 -0
  63. lxml/includes/libxml/encoding.h +307 -0
  64. lxml/includes/libxml/entities.h +147 -0
  65. lxml/includes/libxml/globals.h +25 -0
  66. lxml/includes/libxml/hash.h +251 -0
  67. lxml/includes/libxml/list.h +137 -0
  68. lxml/includes/libxml/nanoftp.h +16 -0
  69. lxml/includes/libxml/nanohttp.h +98 -0
  70. lxml/includes/libxml/parser.h +1633 -0
  71. lxml/includes/libxml/parserInternals.h +591 -0
  72. lxml/includes/libxml/relaxng.h +224 -0
  73. lxml/includes/libxml/schemasInternals.h +959 -0
  74. lxml/includes/libxml/schematron.h +143 -0
  75. lxml/includes/libxml/threads.h +81 -0
  76. lxml/includes/libxml/tree.h +1326 -0
  77. lxml/includes/libxml/uri.h +106 -0
  78. lxml/includes/libxml/valid.h +485 -0
  79. lxml/includes/libxml/xinclude.h +141 -0
  80. lxml/includes/libxml/xlink.h +193 -0
  81. lxml/includes/libxml/xmlIO.h +419 -0
  82. lxml/includes/libxml/xmlautomata.h +163 -0
  83. lxml/includes/libxml/xmlerror.h +962 -0
  84. lxml/includes/libxml/xmlexports.h +96 -0
  85. lxml/includes/libxml/xmlmemory.h +188 -0
  86. lxml/includes/libxml/xmlmodule.h +61 -0
  87. lxml/includes/libxml/xmlreader.h +444 -0
  88. lxml/includes/libxml/xmlregexp.h +116 -0
  89. lxml/includes/libxml/xmlsave.h +111 -0
  90. lxml/includes/libxml/xmlschemas.h +254 -0
  91. lxml/includes/libxml/xmlschemastypes.h +152 -0
  92. lxml/includes/libxml/xmlstring.h +140 -0
  93. lxml/includes/libxml/xmlunicode.h +15 -0
  94. lxml/includes/libxml/xmlversion.h +332 -0
  95. lxml/includes/libxml/xmlwriter.h +489 -0
  96. lxml/includes/libxml/xpath.h +569 -0
  97. lxml/includes/libxml/xpathInternals.h +639 -0
  98. lxml/includes/libxml/xpointer.h +48 -0
  99. lxml/includes/libxslt/__init__.py +0 -0
  100. lxml/includes/libxslt/attributes.h +39 -0
  101. lxml/includes/libxslt/documents.h +93 -0
  102. lxml/includes/libxslt/extensions.h +262 -0
  103. lxml/includes/libxslt/extra.h +72 -0
  104. lxml/includes/libxslt/functions.h +78 -0
  105. lxml/includes/libxslt/imports.h +75 -0
  106. lxml/includes/libxslt/keys.h +53 -0
  107. lxml/includes/libxslt/namespaces.h +68 -0
  108. lxml/includes/libxslt/numbersInternals.h +73 -0
  109. lxml/includes/libxslt/pattern.h +84 -0
  110. lxml/includes/libxslt/preproc.h +43 -0
  111. lxml/includes/libxslt/security.h +104 -0
  112. lxml/includes/libxslt/templates.h +77 -0
  113. lxml/includes/libxslt/transform.h +207 -0
  114. lxml/includes/libxslt/variables.h +118 -0
  115. lxml/includes/libxslt/xslt.h +110 -0
  116. lxml/includes/libxslt/xsltInternals.h +1995 -0
  117. lxml/includes/libxslt/xsltconfig.h +146 -0
  118. lxml/includes/libxslt/xsltexports.h +64 -0
  119. lxml/includes/libxslt/xsltlocale.h +44 -0
  120. lxml/includes/libxslt/xsltutils.h +343 -0
  121. lxml/includes/lxml-version.h +3 -0
  122. lxml/includes/relaxng.pxd +64 -0
  123. lxml/includes/schematron.pxd +34 -0
  124. lxml/includes/tree.pxd +492 -0
  125. lxml/includes/uri.pxd +5 -0
  126. lxml/includes/xinclude.pxd +22 -0
  127. lxml/includes/xmlerror.pxd +852 -0
  128. lxml/includes/xmlparser.pxd +303 -0
  129. lxml/includes/xmlschema.pxd +35 -0
  130. lxml/includes/xpath.pxd +136 -0
  131. lxml/includes/xslt.pxd +190 -0
  132. lxml/isoschematron/__init__.py +348 -0
  133. lxml/isoschematron/resources/rng/iso-schematron.rng +709 -0
  134. lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl +75 -0
  135. lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl +77 -0
  136. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl +313 -0
  137. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl +1160 -0
  138. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl +55 -0
  139. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl +1796 -0
  140. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl +588 -0
  141. lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt +84 -0
  142. lxml/iterparse.pxi +438 -0
  143. lxml/lxml.etree.h +244 -0
  144. lxml/lxml.etree_api.h +204 -0
  145. lxml/nsclasses.pxi +281 -0
  146. lxml/objectify.cpython-312-darwin.so +0 -0
  147. lxml/objectify.pyx +2149 -0
  148. lxml/objectpath.pxi +332 -0
  149. lxml/parser.pxi +2059 -0
  150. lxml/parsertarget.pxi +180 -0
  151. lxml/proxy.pxi +619 -0
  152. lxml/public-api.pxi +178 -0
  153. lxml/pyclasslookup.py +3 -0
  154. lxml/readonlytree.pxi +565 -0
  155. lxml/relaxng.pxi +165 -0
  156. lxml/sax.cpython-312-darwin.so +0 -0
  157. lxml/sax.py +286 -0
  158. lxml/saxparser.pxi +875 -0
  159. lxml/schematron.pxi +173 -0
  160. lxml/serializer.pxi +1849 -0
  161. lxml/usedoctest.py +13 -0
  162. lxml/xinclude.pxi +67 -0
  163. lxml/xmlerror.pxi +1654 -0
  164. lxml/xmlid.pxi +179 -0
  165. lxml/xmlschema.pxi +215 -0
  166. lxml/xpath.pxi +487 -0
  167. lxml/xslt.pxi +957 -0
  168. lxml/xsltext.pxi +242 -0
  169. lxml-6.0.0.dist-info/METADATA +163 -0
  170. lxml-6.0.0.dist-info/RECORD +174 -0
  171. lxml-6.0.0.dist-info/WHEEL +6 -0
  172. lxml-6.0.0.dist-info/licenses/LICENSE.txt +31 -0
  173. lxml-6.0.0.dist-info/licenses/LICENSES.txt +29 -0
  174. lxml-6.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1326 @@
1
+ /*
2
+ * Summary: interfaces for tree manipulation
3
+ * Description: this module describes the structures found in an tree resulting
4
+ * from an XML or HTML parsing, as well as the API provided for
5
+ * various processing on that tree
6
+ *
7
+ * Copy: See Copyright for the status of this software.
8
+ *
9
+ * Author: Daniel Veillard
10
+ */
11
+
12
+ #ifndef XML_TREE_INTERNALS
13
+
14
+ /*
15
+ * Emulate circular dependency for backward compatibility
16
+ */
17
+ #include <libxml/parser.h>
18
+
19
+ #else /* XML_TREE_INTERNALS */
20
+
21
+ #ifndef __XML_TREE_H__
22
+ #define __XML_TREE_H__
23
+
24
+ #include <stdio.h>
25
+ #include <limits.h>
26
+ #include <libxml/xmlversion.h>
27
+ #include <libxml/xmlstring.h>
28
+ #include <libxml/xmlmemory.h>
29
+ #include <libxml/xmlregexp.h>
30
+
31
+ #ifdef __cplusplus
32
+ extern "C" {
33
+ #endif
34
+
35
+ /*
36
+ * Backward compatibility
37
+ */
38
+ #define xmlBufferAllocScheme XML_BUFFER_ALLOC_EXACT
39
+ #define xmlDefaultBufferSize 4096
40
+
41
+ /*
42
+ * Some of the basic types pointer to structures:
43
+ */
44
+ /* xmlIO.h */
45
+ typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
46
+ typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
47
+
48
+ typedef struct _xmlOutputBuffer xmlOutputBuffer;
49
+ typedef xmlOutputBuffer *xmlOutputBufferPtr;
50
+
51
+ /* parser.h */
52
+ typedef struct _xmlParserInput xmlParserInput;
53
+ typedef xmlParserInput *xmlParserInputPtr;
54
+
55
+ typedef struct _xmlParserCtxt xmlParserCtxt;
56
+ typedef xmlParserCtxt *xmlParserCtxtPtr;
57
+
58
+ typedef struct _xmlSAXLocator xmlSAXLocator;
59
+ typedef xmlSAXLocator *xmlSAXLocatorPtr;
60
+
61
+ typedef struct _xmlSAXHandler xmlSAXHandler;
62
+ typedef xmlSAXHandler *xmlSAXHandlerPtr;
63
+
64
+ /* entities.h */
65
+ typedef struct _xmlEntity xmlEntity;
66
+ typedef xmlEntity *xmlEntityPtr;
67
+
68
+ /**
69
+ * LIBXML_NAMESPACE_DICT:
70
+ *
71
+ * Defines experimental behaviour:
72
+ * 1) xmlNs gets an additional field @context (a xmlDoc)
73
+ * 2) when creating a tree, xmlNs->href is stored in the dict of xmlDoc.
74
+ */
75
+ /* #define LIBXML_NAMESPACE_DICT */
76
+
77
+ /**
78
+ * xmlBufferAllocationScheme:
79
+ *
80
+ * A buffer allocation scheme can be defined to either match exactly the
81
+ * need or double it's allocated size each time it is found too small.
82
+ */
83
+
84
+ typedef enum {
85
+ XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */
86
+ XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
87
+ XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer, deprecated */
88
+ XML_BUFFER_ALLOC_IO, /* special allocation scheme used for I/O */
89
+ XML_BUFFER_ALLOC_HYBRID, /* exact up to a threshold, and doubleit thereafter */
90
+ XML_BUFFER_ALLOC_BOUNDED /* limit the upper size of the buffer */
91
+ } xmlBufferAllocationScheme;
92
+
93
+ /**
94
+ * xmlBuffer:
95
+ *
96
+ * A buffer structure, this old construct is limited to 2GB and
97
+ * is being deprecated, use API with xmlBuf instead
98
+ */
99
+ typedef struct _xmlBuffer xmlBuffer;
100
+ typedef xmlBuffer *xmlBufferPtr;
101
+ struct _xmlBuffer {
102
+ /* The buffer content UTF8 */
103
+ xmlChar *content XML_DEPRECATED_MEMBER;
104
+ /* The buffer size used */
105
+ unsigned int use XML_DEPRECATED_MEMBER;
106
+ /* The buffer size */
107
+ unsigned int size XML_DEPRECATED_MEMBER;
108
+ /* The realloc method */
109
+ xmlBufferAllocationScheme alloc XML_DEPRECATED_MEMBER;
110
+ /* in IO mode we may have a different base */
111
+ xmlChar *contentIO XML_DEPRECATED_MEMBER;
112
+ };
113
+
114
+ /**
115
+ * xmlBuf:
116
+ *
117
+ * A buffer structure, new one, the actual structure internals are not public
118
+ */
119
+
120
+ typedef struct _xmlBuf xmlBuf;
121
+
122
+ /**
123
+ * xmlBufPtr:
124
+ *
125
+ * A pointer to a buffer structure, the actual structure internals are not
126
+ * public
127
+ */
128
+
129
+ typedef xmlBuf *xmlBufPtr;
130
+
131
+ /*
132
+ * A few public routines for xmlBuf. As those are expected to be used
133
+ * mostly internally the bulk of the routines are internal in buf.h
134
+ */
135
+ XMLPUBFUN xmlChar* xmlBufContent (const xmlBuf* buf);
136
+ XMLPUBFUN xmlChar* xmlBufEnd (xmlBufPtr buf);
137
+ XMLPUBFUN size_t xmlBufUse (const xmlBufPtr buf);
138
+ XMLPUBFUN size_t xmlBufShrink (xmlBufPtr buf, size_t len);
139
+
140
+ /*
141
+ * LIBXML2_NEW_BUFFER:
142
+ *
143
+ * Macro used to express that the API use the new buffers for
144
+ * xmlParserInputBuffer and xmlOutputBuffer. The change was
145
+ * introduced in 2.9.0.
146
+ */
147
+ #define LIBXML2_NEW_BUFFER
148
+
149
+ /**
150
+ * XML_XML_NAMESPACE:
151
+ *
152
+ * This is the namespace for the special xml: prefix predefined in the
153
+ * XML Namespace specification.
154
+ */
155
+ #define XML_XML_NAMESPACE \
156
+ (const xmlChar *) "http://www.w3.org/XML/1998/namespace"
157
+
158
+ /**
159
+ * XML_XML_ID:
160
+ *
161
+ * This is the name for the special xml:id attribute
162
+ */
163
+ #define XML_XML_ID (const xmlChar *) "xml:id"
164
+
165
+ /*
166
+ * The different element types carried by an XML tree.
167
+ *
168
+ * NOTE: This is synchronized with DOM Level1 values
169
+ * See http://www.w3.org/TR/REC-DOM-Level-1/
170
+ *
171
+ * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
172
+ * be deprecated to use an XML_DTD_NODE.
173
+ */
174
+ typedef enum {
175
+ XML_ELEMENT_NODE= 1,
176
+ XML_ATTRIBUTE_NODE= 2,
177
+ XML_TEXT_NODE= 3,
178
+ XML_CDATA_SECTION_NODE= 4,
179
+ XML_ENTITY_REF_NODE= 5,
180
+ XML_ENTITY_NODE= 6, /* unused */
181
+ XML_PI_NODE= 7,
182
+ XML_COMMENT_NODE= 8,
183
+ XML_DOCUMENT_NODE= 9,
184
+ XML_DOCUMENT_TYPE_NODE= 10, /* unused */
185
+ XML_DOCUMENT_FRAG_NODE= 11,
186
+ XML_NOTATION_NODE= 12, /* unused */
187
+ XML_HTML_DOCUMENT_NODE= 13,
188
+ XML_DTD_NODE= 14,
189
+ XML_ELEMENT_DECL= 15,
190
+ XML_ATTRIBUTE_DECL= 16,
191
+ XML_ENTITY_DECL= 17,
192
+ XML_NAMESPACE_DECL= 18,
193
+ XML_XINCLUDE_START= 19,
194
+ XML_XINCLUDE_END= 20
195
+ /* XML_DOCB_DOCUMENT_NODE= 21 */ /* removed */
196
+ } xmlElementType;
197
+
198
+ /** DOC_DISABLE */
199
+ /* For backward compatibility */
200
+ #define XML_DOCB_DOCUMENT_NODE 21
201
+ /** DOC_ENABLE */
202
+
203
+ /**
204
+ * xmlNotation:
205
+ *
206
+ * A DTD Notation definition.
207
+ */
208
+
209
+ typedef struct _xmlNotation xmlNotation;
210
+ typedef xmlNotation *xmlNotationPtr;
211
+ struct _xmlNotation {
212
+ const xmlChar *name; /* Notation name */
213
+ const xmlChar *PublicID; /* Public identifier, if any */
214
+ const xmlChar *SystemID; /* System identifier, if any */
215
+ };
216
+
217
+ /**
218
+ * xmlAttributeType:
219
+ *
220
+ * A DTD Attribute type definition.
221
+ */
222
+
223
+ typedef enum {
224
+ XML_ATTRIBUTE_CDATA = 1,
225
+ XML_ATTRIBUTE_ID,
226
+ XML_ATTRIBUTE_IDREF ,
227
+ XML_ATTRIBUTE_IDREFS,
228
+ XML_ATTRIBUTE_ENTITY,
229
+ XML_ATTRIBUTE_ENTITIES,
230
+ XML_ATTRIBUTE_NMTOKEN,
231
+ XML_ATTRIBUTE_NMTOKENS,
232
+ XML_ATTRIBUTE_ENUMERATION,
233
+ XML_ATTRIBUTE_NOTATION
234
+ } xmlAttributeType;
235
+
236
+ /**
237
+ * xmlAttributeDefault:
238
+ *
239
+ * A DTD Attribute default definition.
240
+ */
241
+
242
+ typedef enum {
243
+ XML_ATTRIBUTE_NONE = 1,
244
+ XML_ATTRIBUTE_REQUIRED,
245
+ XML_ATTRIBUTE_IMPLIED,
246
+ XML_ATTRIBUTE_FIXED
247
+ } xmlAttributeDefault;
248
+
249
+ /**
250
+ * xmlEnumeration:
251
+ *
252
+ * List structure used when there is an enumeration in DTDs.
253
+ */
254
+
255
+ typedef struct _xmlEnumeration xmlEnumeration;
256
+ typedef xmlEnumeration *xmlEnumerationPtr;
257
+ struct _xmlEnumeration {
258
+ struct _xmlEnumeration *next; /* next one */
259
+ const xmlChar *name; /* Enumeration name */
260
+ };
261
+
262
+ /**
263
+ * xmlAttribute:
264
+ *
265
+ * An Attribute declaration in a DTD.
266
+ */
267
+
268
+ typedef struct _xmlAttribute xmlAttribute;
269
+ typedef xmlAttribute *xmlAttributePtr;
270
+ struct _xmlAttribute {
271
+ void *_private; /* application data */
272
+ xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */
273
+ const xmlChar *name; /* Attribute name */
274
+ struct _xmlNode *children; /* NULL */
275
+ struct _xmlNode *last; /* NULL */
276
+ struct _xmlDtd *parent; /* -> DTD */
277
+ struct _xmlNode *next; /* next sibling link */
278
+ struct _xmlNode *prev; /* previous sibling link */
279
+ struct _xmlDoc *doc; /* the containing document */
280
+
281
+ struct _xmlAttribute *nexth; /* next in hash table */
282
+ xmlAttributeType atype; /* The attribute type */
283
+ xmlAttributeDefault def; /* the default */
284
+ const xmlChar *defaultValue; /* or the default value */
285
+ xmlEnumerationPtr tree; /* or the enumeration tree if any */
286
+ const xmlChar *prefix; /* the namespace prefix if any */
287
+ const xmlChar *elem; /* Element holding the attribute */
288
+ };
289
+
290
+ /**
291
+ * xmlElementContentType:
292
+ *
293
+ * Possible definitions of element content types.
294
+ */
295
+ typedef enum {
296
+ XML_ELEMENT_CONTENT_PCDATA = 1,
297
+ XML_ELEMENT_CONTENT_ELEMENT,
298
+ XML_ELEMENT_CONTENT_SEQ,
299
+ XML_ELEMENT_CONTENT_OR
300
+ } xmlElementContentType;
301
+
302
+ /**
303
+ * xmlElementContentOccur:
304
+ *
305
+ * Possible definitions of element content occurrences.
306
+ */
307
+ typedef enum {
308
+ XML_ELEMENT_CONTENT_ONCE = 1,
309
+ XML_ELEMENT_CONTENT_OPT,
310
+ XML_ELEMENT_CONTENT_MULT,
311
+ XML_ELEMENT_CONTENT_PLUS
312
+ } xmlElementContentOccur;
313
+
314
+ /**
315
+ * xmlElementContent:
316
+ *
317
+ * An XML Element content as stored after parsing an element definition
318
+ * in a DTD.
319
+ */
320
+
321
+ typedef struct _xmlElementContent xmlElementContent;
322
+ typedef xmlElementContent *xmlElementContentPtr;
323
+ struct _xmlElementContent {
324
+ xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
325
+ xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
326
+ const xmlChar *name; /* Element name */
327
+ struct _xmlElementContent *c1; /* first child */
328
+ struct _xmlElementContent *c2; /* second child */
329
+ struct _xmlElementContent *parent; /* parent */
330
+ const xmlChar *prefix; /* Namespace prefix */
331
+ };
332
+
333
+ /**
334
+ * xmlElementTypeVal:
335
+ *
336
+ * The different possibilities for an element content type.
337
+ */
338
+
339
+ typedef enum {
340
+ XML_ELEMENT_TYPE_UNDEFINED = 0,
341
+ XML_ELEMENT_TYPE_EMPTY = 1,
342
+ XML_ELEMENT_TYPE_ANY,
343
+ XML_ELEMENT_TYPE_MIXED,
344
+ XML_ELEMENT_TYPE_ELEMENT
345
+ } xmlElementTypeVal;
346
+
347
+ /**
348
+ * xmlElement:
349
+ *
350
+ * An XML Element declaration from a DTD.
351
+ */
352
+
353
+ typedef struct _xmlElement xmlElement;
354
+ typedef xmlElement *xmlElementPtr;
355
+ struct _xmlElement {
356
+ void *_private; /* application data */
357
+ xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */
358
+ const xmlChar *name; /* Element name */
359
+ struct _xmlNode *children; /* NULL */
360
+ struct _xmlNode *last; /* NULL */
361
+ struct _xmlDtd *parent; /* -> DTD */
362
+ struct _xmlNode *next; /* next sibling link */
363
+ struct _xmlNode *prev; /* previous sibling link */
364
+ struct _xmlDoc *doc; /* the containing document */
365
+
366
+ xmlElementTypeVal etype; /* The type */
367
+ xmlElementContentPtr content; /* the allowed element content */
368
+ xmlAttributePtr attributes; /* List of the declared attributes */
369
+ const xmlChar *prefix; /* the namespace prefix if any */
370
+ #ifdef LIBXML_REGEXP_ENABLED
371
+ xmlRegexpPtr contModel; /* the validating regexp */
372
+ #else
373
+ void *contModel;
374
+ #endif
375
+ };
376
+
377
+
378
+ /**
379
+ * XML_LOCAL_NAMESPACE:
380
+ *
381
+ * A namespace declaration node.
382
+ */
383
+ #define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
384
+ typedef xmlElementType xmlNsType;
385
+
386
+ /**
387
+ * xmlNs:
388
+ *
389
+ * An XML namespace.
390
+ * Note that prefix == NULL is valid, it defines the default namespace
391
+ * within the subtree (until overridden).
392
+ *
393
+ * xmlNsType is unified with xmlElementType.
394
+ */
395
+
396
+ typedef struct _xmlNs xmlNs;
397
+ typedef xmlNs *xmlNsPtr;
398
+ struct _xmlNs {
399
+ struct _xmlNs *next; /* next Ns link for this node */
400
+ xmlNsType type; /* global or local */
401
+ const xmlChar *href; /* URL for the namespace */
402
+ const xmlChar *prefix; /* prefix for the namespace */
403
+ void *_private; /* application data */
404
+ struct _xmlDoc *context; /* normally an xmlDoc */
405
+ };
406
+
407
+ /**
408
+ * xmlDtd:
409
+ *
410
+ * An XML DTD, as defined by <!DOCTYPE ... There is actually one for
411
+ * the internal subset and for the external subset.
412
+ */
413
+ typedef struct _xmlDtd xmlDtd;
414
+ typedef xmlDtd *xmlDtdPtr;
415
+ struct _xmlDtd {
416
+ void *_private; /* application data */
417
+ xmlElementType type; /* XML_DTD_NODE, must be second ! */
418
+ const xmlChar *name; /* Name of the DTD */
419
+ struct _xmlNode *children; /* the value of the property link */
420
+ struct _xmlNode *last; /* last child link */
421
+ struct _xmlDoc *parent; /* child->parent link */
422
+ struct _xmlNode *next; /* next sibling link */
423
+ struct _xmlNode *prev; /* previous sibling link */
424
+ struct _xmlDoc *doc; /* the containing document */
425
+
426
+ /* End of common part */
427
+ void *notations; /* Hash table for notations if any */
428
+ void *elements; /* Hash table for elements if any */
429
+ void *attributes; /* Hash table for attributes if any */
430
+ void *entities; /* Hash table for entities if any */
431
+ const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
432
+ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
433
+ void *pentities; /* Hash table for param entities if any */
434
+ };
435
+
436
+ /**
437
+ * xmlAttr:
438
+ *
439
+ * An attribute on an XML node.
440
+ */
441
+ typedef struct _xmlAttr xmlAttr;
442
+ typedef xmlAttr *xmlAttrPtr;
443
+ struct _xmlAttr {
444
+ void *_private; /* application data */
445
+ xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */
446
+ const xmlChar *name; /* the name of the property */
447
+ struct _xmlNode *children; /* the value of the property */
448
+ struct _xmlNode *last; /* NULL */
449
+ struct _xmlNode *parent; /* child->parent link */
450
+ struct _xmlAttr *next; /* next sibling link */
451
+ struct _xmlAttr *prev; /* previous sibling link */
452
+ struct _xmlDoc *doc; /* the containing document */
453
+ xmlNs *ns; /* pointer to the associated namespace */
454
+ xmlAttributeType atype; /* the attribute type if validating */
455
+ void *psvi; /* for type/PSVI information */
456
+ struct _xmlID *id; /* the ID struct */
457
+ };
458
+
459
+ /**
460
+ * xmlID:
461
+ *
462
+ * An XML ID instance.
463
+ */
464
+
465
+ typedef struct _xmlID xmlID;
466
+ typedef xmlID *xmlIDPtr;
467
+ struct _xmlID {
468
+ struct _xmlID *next; /* next ID */
469
+ const xmlChar *value; /* The ID name */
470
+ xmlAttrPtr attr; /* The attribute holding it */
471
+ const xmlChar *name; /* The attribute if attr is not available */
472
+ int lineno; /* The line number if attr is not available */
473
+ struct _xmlDoc *doc; /* The document holding the ID */
474
+ };
475
+
476
+ /**
477
+ * xmlRef:
478
+ *
479
+ * An XML IDREF instance.
480
+ */
481
+
482
+ typedef struct _xmlRef xmlRef;
483
+ typedef xmlRef *xmlRefPtr;
484
+ struct _xmlRef {
485
+ struct _xmlRef *next; /* next Ref */
486
+ const xmlChar *value; /* The Ref name */
487
+ xmlAttrPtr attr; /* The attribute holding it */
488
+ const xmlChar *name; /* The attribute if attr is not available */
489
+ int lineno; /* The line number if attr is not available */
490
+ };
491
+
492
+ /**
493
+ * xmlNode:
494
+ *
495
+ * A node in an XML tree.
496
+ */
497
+ typedef struct _xmlNode xmlNode;
498
+ typedef xmlNode *xmlNodePtr;
499
+ struct _xmlNode {
500
+ void *_private; /* application data */
501
+ xmlElementType type; /* type number, must be second ! */
502
+ const xmlChar *name; /* the name of the node, or the entity */
503
+ struct _xmlNode *children; /* parent->childs link */
504
+ struct _xmlNode *last; /* last child link */
505
+ struct _xmlNode *parent; /* child->parent link */
506
+ struct _xmlNode *next; /* next sibling link */
507
+ struct _xmlNode *prev; /* previous sibling link */
508
+ struct _xmlDoc *doc; /* the containing document */
509
+
510
+ /* End of common part */
511
+ xmlNs *ns; /* pointer to the associated namespace */
512
+ xmlChar *content; /* the content */
513
+ struct _xmlAttr *properties;/* properties list */
514
+ xmlNs *nsDef; /* namespace definitions on this node */
515
+ void *psvi; /* for type/PSVI information */
516
+ unsigned short line; /* line number */
517
+ unsigned short extra; /* extra data for XPath/XSLT */
518
+ };
519
+
520
+ /**
521
+ * XML_GET_CONTENT:
522
+ *
523
+ * Macro to extract the content pointer of a node.
524
+ */
525
+ #define XML_GET_CONTENT(n) \
526
+ ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
527
+
528
+ /**
529
+ * XML_GET_LINE:
530
+ *
531
+ * Macro to extract the line number of an element node.
532
+ */
533
+ #define XML_GET_LINE(n) \
534
+ (xmlGetLineNo(n))
535
+
536
+ /**
537
+ * xmlDocProperty
538
+ *
539
+ * Set of properties of the document as found by the parser
540
+ * Some of them are linked to similarly named xmlParserOption
541
+ */
542
+ typedef enum {
543
+ XML_DOC_WELLFORMED = 1<<0, /* document is XML well formed */
544
+ XML_DOC_NSVALID = 1<<1, /* document is Namespace valid */
545
+ XML_DOC_OLD10 = 1<<2, /* parsed with old XML-1.0 parser */
546
+ XML_DOC_DTDVALID = 1<<3, /* DTD validation was successful */
547
+ XML_DOC_XINCLUDE = 1<<4, /* XInclude substitution was done */
548
+ XML_DOC_USERBUILT = 1<<5, /* Document was built using the API
549
+ and not by parsing an instance */
550
+ XML_DOC_INTERNAL = 1<<6, /* built for internal processing */
551
+ XML_DOC_HTML = 1<<7 /* parsed or built HTML document */
552
+ } xmlDocProperties;
553
+
554
+ /**
555
+ * xmlDoc:
556
+ *
557
+ * An XML document.
558
+ */
559
+ typedef struct _xmlDoc xmlDoc;
560
+ typedef xmlDoc *xmlDocPtr;
561
+ struct _xmlDoc {
562
+ void *_private; /* application data */
563
+ xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
564
+ char *name; /* name/filename/URI of the document */
565
+ struct _xmlNode *children; /* the document tree */
566
+ struct _xmlNode *last; /* last child link */
567
+ struct _xmlNode *parent; /* child->parent link */
568
+ struct _xmlNode *next; /* next sibling link */
569
+ struct _xmlNode *prev; /* previous sibling link */
570
+ struct _xmlDoc *doc; /* autoreference to itself */
571
+
572
+ /* End of common part */
573
+ int compression;/* level of zlib compression */
574
+ int standalone; /* standalone document (no external refs)
575
+ 1 if standalone="yes"
576
+ 0 if standalone="no"
577
+ -1 if there is no XML declaration
578
+ -2 if there is an XML declaration, but no
579
+ standalone attribute was specified */
580
+ struct _xmlDtd *intSubset; /* the document internal subset */
581
+ struct _xmlDtd *extSubset; /* the document external subset */
582
+ struct _xmlNs *oldNs; /* Global namespace, the old way */
583
+ const xmlChar *version; /* the XML version string */
584
+ const xmlChar *encoding; /* actual encoding, if any */
585
+ void *ids; /* Hash table for ID attributes if any */
586
+ void *refs; /* Hash table for IDREFs attributes if any */
587
+ const xmlChar *URL; /* The URI for that document */
588
+ int charset; /* unused */
589
+ struct _xmlDict *dict; /* dict used to allocate names or NULL */
590
+ void *psvi; /* for type/PSVI information */
591
+ int parseFlags; /* set of xmlParserOption used to parse the
592
+ document */
593
+ int properties; /* set of xmlDocProperties for this document
594
+ set at the end of parsing */
595
+ };
596
+
597
+
598
+ typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
599
+ typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
600
+
601
+ /**
602
+ * xmlDOMWrapAcquireNsFunction:
603
+ * @ctxt: a DOM wrapper context
604
+ * @node: the context node (element or attribute)
605
+ * @nsName: the requested namespace name
606
+ * @nsPrefix: the requested namespace prefix
607
+ *
608
+ * A function called to acquire namespaces (xmlNs) from the wrapper.
609
+ *
610
+ * Returns an xmlNsPtr or NULL in case of an error.
611
+ */
612
+ typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt,
613
+ xmlNodePtr node,
614
+ const xmlChar *nsName,
615
+ const xmlChar *nsPrefix);
616
+
617
+ /**
618
+ * xmlDOMWrapCtxt:
619
+ *
620
+ * Context for DOM wrapper-operations.
621
+ */
622
+ struct _xmlDOMWrapCtxt {
623
+ void * _private;
624
+ /*
625
+ * The type of this context, just in case we need specialized
626
+ * contexts in the future.
627
+ */
628
+ int type;
629
+ /*
630
+ * Internal namespace map used for various operations.
631
+ */
632
+ void * namespaceMap;
633
+ /*
634
+ * Use this one to acquire an xmlNsPtr intended for node->ns.
635
+ * (Note that this is not intended for elem->nsDef).
636
+ */
637
+ xmlDOMWrapAcquireNsFunction getNsForNodeFunc;
638
+ };
639
+
640
+ /**
641
+ * xmlRegisterNodeFunc:
642
+ * @node: the current node
643
+ *
644
+ * Signature for the registration callback of a created node
645
+ */
646
+ typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
647
+
648
+ /**
649
+ * xmlDeregisterNodeFunc:
650
+ * @node: the current node
651
+ *
652
+ * Signature for the deregistration callback of a discarded node
653
+ */
654
+ typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
655
+
656
+ /**
657
+ * xmlChildrenNode:
658
+ *
659
+ * Macro for compatibility naming layer with libxml1. Maps
660
+ * to "children."
661
+ */
662
+ #ifndef xmlChildrenNode
663
+ #define xmlChildrenNode children
664
+ #endif
665
+
666
+ /**
667
+ * xmlRootNode:
668
+ *
669
+ * Macro for compatibility naming layer with libxml1. Maps
670
+ * to "children".
671
+ */
672
+ #ifndef xmlRootNode
673
+ #define xmlRootNode children
674
+ #endif
675
+
676
+ /*
677
+ * Variables.
678
+ */
679
+
680
+ /** DOC_DISABLE */
681
+ XML_DEPRECATED
682
+ XMLPUBFUN xmlRegisterNodeFunc *__xmlRegisterNodeDefaultValue(void);
683
+ XML_DEPRECATED
684
+ XMLPUBFUN xmlDeregisterNodeFunc *__xmlDeregisterNodeDefaultValue(void);
685
+
686
+ #ifndef XML_GLOBALS_NO_REDEFINITION
687
+ #define xmlRegisterNodeDefaultValue \
688
+ (*__xmlRegisterNodeDefaultValue())
689
+ #define xmlDeregisterNodeDefaultValue \
690
+ (*__xmlDeregisterNodeDefaultValue())
691
+ #endif
692
+ /** DOC_ENABLE */
693
+
694
+ /*
695
+ * Some helper functions
696
+ */
697
+ XMLPUBFUN int
698
+ xmlValidateNCName (const xmlChar *value,
699
+ int space);
700
+
701
+ XMLPUBFUN int
702
+ xmlValidateQName (const xmlChar *value,
703
+ int space);
704
+ XMLPUBFUN int
705
+ xmlValidateName (const xmlChar *value,
706
+ int space);
707
+ XMLPUBFUN int
708
+ xmlValidateNMToken (const xmlChar *value,
709
+ int space);
710
+
711
+ XMLPUBFUN xmlChar *
712
+ xmlBuildQName (const xmlChar *ncname,
713
+ const xmlChar *prefix,
714
+ xmlChar *memory,
715
+ int len);
716
+ XMLPUBFUN xmlChar *
717
+ xmlSplitQName2 (const xmlChar *name,
718
+ xmlChar **prefix);
719
+ XMLPUBFUN const xmlChar *
720
+ xmlSplitQName3 (const xmlChar *name,
721
+ int *len);
722
+
723
+ /*
724
+ * Handling Buffers, the old ones see @xmlBuf for the new ones.
725
+ */
726
+
727
+ XML_DEPRECATED
728
+ XMLPUBFUN void
729
+ xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
730
+ XML_DEPRECATED
731
+ XMLPUBFUN xmlBufferAllocationScheme
732
+ xmlGetBufferAllocationScheme(void);
733
+
734
+ XMLPUBFUN xmlBufferPtr
735
+ xmlBufferCreate (void);
736
+ XMLPUBFUN xmlBufferPtr
737
+ xmlBufferCreateSize (size_t size);
738
+ XMLPUBFUN xmlBufferPtr
739
+ xmlBufferCreateStatic (void *mem,
740
+ size_t size);
741
+ XML_DEPRECATED
742
+ XMLPUBFUN int
743
+ xmlBufferResize (xmlBufferPtr buf,
744
+ unsigned int size);
745
+ XMLPUBFUN void
746
+ xmlBufferFree (xmlBufferPtr buf);
747
+ XMLPUBFUN int
748
+ xmlBufferDump (FILE *file,
749
+ xmlBufferPtr buf);
750
+ XMLPUBFUN int
751
+ xmlBufferAdd (xmlBufferPtr buf,
752
+ const xmlChar *str,
753
+ int len);
754
+ XMLPUBFUN int
755
+ xmlBufferAddHead (xmlBufferPtr buf,
756
+ const xmlChar *str,
757
+ int len);
758
+ XMLPUBFUN int
759
+ xmlBufferCat (xmlBufferPtr buf,
760
+ const xmlChar *str);
761
+ XMLPUBFUN int
762
+ xmlBufferCCat (xmlBufferPtr buf,
763
+ const char *str);
764
+ XML_DEPRECATED
765
+ XMLPUBFUN int
766
+ xmlBufferShrink (xmlBufferPtr buf,
767
+ unsigned int len);
768
+ XML_DEPRECATED
769
+ XMLPUBFUN int
770
+ xmlBufferGrow (xmlBufferPtr buf,
771
+ unsigned int len);
772
+ XMLPUBFUN void
773
+ xmlBufferEmpty (xmlBufferPtr buf);
774
+ XMLPUBFUN const xmlChar*
775
+ xmlBufferContent (const xmlBuffer *buf);
776
+ XMLPUBFUN xmlChar*
777
+ xmlBufferDetach (xmlBufferPtr buf);
778
+ XMLPUBFUN void
779
+ xmlBufferSetAllocationScheme(xmlBufferPtr buf,
780
+ xmlBufferAllocationScheme scheme);
781
+ XMLPUBFUN int
782
+ xmlBufferLength (const xmlBuffer *buf);
783
+
784
+ /*
785
+ * Creating/freeing new structures.
786
+ */
787
+ XMLPUBFUN xmlDtdPtr
788
+ xmlCreateIntSubset (xmlDocPtr doc,
789
+ const xmlChar *name,
790
+ const xmlChar *ExternalID,
791
+ const xmlChar *SystemID);
792
+ XMLPUBFUN xmlDtdPtr
793
+ xmlNewDtd (xmlDocPtr doc,
794
+ const xmlChar *name,
795
+ const xmlChar *ExternalID,
796
+ const xmlChar *SystemID);
797
+ XMLPUBFUN xmlDtdPtr
798
+ xmlGetIntSubset (const xmlDoc *doc);
799
+ XMLPUBFUN void
800
+ xmlFreeDtd (xmlDtdPtr cur);
801
+ XMLPUBFUN xmlNsPtr
802
+ xmlNewNs (xmlNodePtr node,
803
+ const xmlChar *href,
804
+ const xmlChar *prefix);
805
+ XMLPUBFUN void
806
+ xmlFreeNs (xmlNsPtr cur);
807
+ XMLPUBFUN void
808
+ xmlFreeNsList (xmlNsPtr cur);
809
+ XMLPUBFUN xmlDocPtr
810
+ xmlNewDoc (const xmlChar *version);
811
+ XMLPUBFUN void
812
+ xmlFreeDoc (xmlDocPtr cur);
813
+ XMLPUBFUN xmlAttrPtr
814
+ xmlNewDocProp (xmlDocPtr doc,
815
+ const xmlChar *name,
816
+ const xmlChar *value);
817
+ XMLPUBFUN xmlAttrPtr
818
+ xmlNewProp (xmlNodePtr node,
819
+ const xmlChar *name,
820
+ const xmlChar *value);
821
+ XMLPUBFUN xmlAttrPtr
822
+ xmlNewNsProp (xmlNodePtr node,
823
+ xmlNsPtr ns,
824
+ const xmlChar *name,
825
+ const xmlChar *value);
826
+ XMLPUBFUN xmlAttrPtr
827
+ xmlNewNsPropEatName (xmlNodePtr node,
828
+ xmlNsPtr ns,
829
+ xmlChar *name,
830
+ const xmlChar *value);
831
+ XMLPUBFUN void
832
+ xmlFreePropList (xmlAttrPtr cur);
833
+ XMLPUBFUN void
834
+ xmlFreeProp (xmlAttrPtr cur);
835
+ XMLPUBFUN xmlAttrPtr
836
+ xmlCopyProp (xmlNodePtr target,
837
+ xmlAttrPtr cur);
838
+ XMLPUBFUN xmlAttrPtr
839
+ xmlCopyPropList (xmlNodePtr target,
840
+ xmlAttrPtr cur);
841
+ XMLPUBFUN xmlDtdPtr
842
+ xmlCopyDtd (xmlDtdPtr dtd);
843
+ XMLPUBFUN xmlDocPtr
844
+ xmlCopyDoc (xmlDocPtr doc,
845
+ int recursive);
846
+ /*
847
+ * Creating new nodes.
848
+ */
849
+ XMLPUBFUN xmlNodePtr
850
+ xmlNewDocNode (xmlDocPtr doc,
851
+ xmlNsPtr ns,
852
+ const xmlChar *name,
853
+ const xmlChar *content);
854
+ XMLPUBFUN xmlNodePtr
855
+ xmlNewDocNodeEatName (xmlDocPtr doc,
856
+ xmlNsPtr ns,
857
+ xmlChar *name,
858
+ const xmlChar *content);
859
+ XMLPUBFUN xmlNodePtr
860
+ xmlNewNode (xmlNsPtr ns,
861
+ const xmlChar *name);
862
+ XMLPUBFUN xmlNodePtr
863
+ xmlNewNodeEatName (xmlNsPtr ns,
864
+ xmlChar *name);
865
+ XMLPUBFUN xmlNodePtr
866
+ xmlNewChild (xmlNodePtr parent,
867
+ xmlNsPtr ns,
868
+ const xmlChar *name,
869
+ const xmlChar *content);
870
+ XMLPUBFUN xmlNodePtr
871
+ xmlNewDocText (const xmlDoc *doc,
872
+ const xmlChar *content);
873
+ XMLPUBFUN xmlNodePtr
874
+ xmlNewText (const xmlChar *content);
875
+ XMLPUBFUN xmlNodePtr
876
+ xmlNewDocPI (xmlDocPtr doc,
877
+ const xmlChar *name,
878
+ const xmlChar *content);
879
+ XMLPUBFUN xmlNodePtr
880
+ xmlNewPI (const xmlChar *name,
881
+ const xmlChar *content);
882
+ XMLPUBFUN xmlNodePtr
883
+ xmlNewDocTextLen (xmlDocPtr doc,
884
+ const xmlChar *content,
885
+ int len);
886
+ XMLPUBFUN xmlNodePtr
887
+ xmlNewTextLen (const xmlChar *content,
888
+ int len);
889
+ XMLPUBFUN xmlNodePtr
890
+ xmlNewDocComment (xmlDocPtr doc,
891
+ const xmlChar *content);
892
+ XMLPUBFUN xmlNodePtr
893
+ xmlNewComment (const xmlChar *content);
894
+ XMLPUBFUN xmlNodePtr
895
+ xmlNewCDataBlock (xmlDocPtr doc,
896
+ const xmlChar *content,
897
+ int len);
898
+ XMLPUBFUN xmlNodePtr
899
+ xmlNewCharRef (xmlDocPtr doc,
900
+ const xmlChar *name);
901
+ XMLPUBFUN xmlNodePtr
902
+ xmlNewReference (const xmlDoc *doc,
903
+ const xmlChar *name);
904
+ XMLPUBFUN xmlNodePtr
905
+ xmlCopyNode (xmlNodePtr node,
906
+ int recursive);
907
+ XMLPUBFUN xmlNodePtr
908
+ xmlDocCopyNode (xmlNodePtr node,
909
+ xmlDocPtr doc,
910
+ int recursive);
911
+ XMLPUBFUN xmlNodePtr
912
+ xmlDocCopyNodeList (xmlDocPtr doc,
913
+ xmlNodePtr node);
914
+ XMLPUBFUN xmlNodePtr
915
+ xmlCopyNodeList (xmlNodePtr node);
916
+ XMLPUBFUN xmlNodePtr
917
+ xmlNewTextChild (xmlNodePtr parent,
918
+ xmlNsPtr ns,
919
+ const xmlChar *name,
920
+ const xmlChar *content);
921
+ XMLPUBFUN xmlNodePtr
922
+ xmlNewDocRawNode (xmlDocPtr doc,
923
+ xmlNsPtr ns,
924
+ const xmlChar *name,
925
+ const xmlChar *content);
926
+ XMLPUBFUN xmlNodePtr
927
+ xmlNewDocFragment (xmlDocPtr doc);
928
+
929
+ /*
930
+ * Navigating.
931
+ */
932
+ XMLPUBFUN long
933
+ xmlGetLineNo (const xmlNode *node);
934
+ XMLPUBFUN xmlChar *
935
+ xmlGetNodePath (const xmlNode *node);
936
+ XMLPUBFUN xmlNodePtr
937
+ xmlDocGetRootElement (const xmlDoc *doc);
938
+ XMLPUBFUN xmlNodePtr
939
+ xmlGetLastChild (const xmlNode *parent);
940
+ XMLPUBFUN int
941
+ xmlNodeIsText (const xmlNode *node);
942
+ XMLPUBFUN int
943
+ xmlIsBlankNode (const xmlNode *node);
944
+
945
+ /*
946
+ * Changing the structure.
947
+ */
948
+ XMLPUBFUN xmlNodePtr
949
+ xmlDocSetRootElement (xmlDocPtr doc,
950
+ xmlNodePtr root);
951
+ XMLPUBFUN void
952
+ xmlNodeSetName (xmlNodePtr cur,
953
+ const xmlChar *name);
954
+ XMLPUBFUN xmlNodePtr
955
+ xmlAddChild (xmlNodePtr parent,
956
+ xmlNodePtr cur);
957
+ XMLPUBFUN xmlNodePtr
958
+ xmlAddChildList (xmlNodePtr parent,
959
+ xmlNodePtr cur);
960
+ XMLPUBFUN xmlNodePtr
961
+ xmlReplaceNode (xmlNodePtr old,
962
+ xmlNodePtr cur);
963
+ XMLPUBFUN xmlNodePtr
964
+ xmlAddPrevSibling (xmlNodePtr cur,
965
+ xmlNodePtr elem);
966
+ XMLPUBFUN xmlNodePtr
967
+ xmlAddSibling (xmlNodePtr cur,
968
+ xmlNodePtr elem);
969
+ XMLPUBFUN xmlNodePtr
970
+ xmlAddNextSibling (xmlNodePtr cur,
971
+ xmlNodePtr elem);
972
+ XMLPUBFUN void
973
+ xmlUnlinkNode (xmlNodePtr cur);
974
+ XMLPUBFUN xmlNodePtr
975
+ xmlTextMerge (xmlNodePtr first,
976
+ xmlNodePtr second);
977
+ XMLPUBFUN int
978
+ xmlTextConcat (xmlNodePtr node,
979
+ const xmlChar *content,
980
+ int len);
981
+ XMLPUBFUN void
982
+ xmlFreeNodeList (xmlNodePtr cur);
983
+ XMLPUBFUN void
984
+ xmlFreeNode (xmlNodePtr cur);
985
+ XMLPUBFUN int
986
+ xmlSetTreeDoc (xmlNodePtr tree,
987
+ xmlDocPtr doc);
988
+ XMLPUBFUN int
989
+ xmlSetListDoc (xmlNodePtr list,
990
+ xmlDocPtr doc);
991
+ /*
992
+ * Namespaces.
993
+ */
994
+ XMLPUBFUN xmlNsPtr
995
+ xmlSearchNs (xmlDocPtr doc,
996
+ xmlNodePtr node,
997
+ const xmlChar *nameSpace);
998
+ XMLPUBFUN xmlNsPtr
999
+ xmlSearchNsByHref (xmlDocPtr doc,
1000
+ xmlNodePtr node,
1001
+ const xmlChar *href);
1002
+ XMLPUBFUN int
1003
+ xmlGetNsListSafe (const xmlDoc *doc,
1004
+ const xmlNode *node,
1005
+ xmlNsPtr **out);
1006
+ XMLPUBFUN xmlNsPtr *
1007
+ xmlGetNsList (const xmlDoc *doc,
1008
+ const xmlNode *node);
1009
+
1010
+ XMLPUBFUN void
1011
+ xmlSetNs (xmlNodePtr node,
1012
+ xmlNsPtr ns);
1013
+ XMLPUBFUN xmlNsPtr
1014
+ xmlCopyNamespace (xmlNsPtr cur);
1015
+ XMLPUBFUN xmlNsPtr
1016
+ xmlCopyNamespaceList (xmlNsPtr cur);
1017
+
1018
+ /*
1019
+ * Changing the content.
1020
+ */
1021
+ XMLPUBFUN xmlAttrPtr
1022
+ xmlSetProp (xmlNodePtr node,
1023
+ const xmlChar *name,
1024
+ const xmlChar *value);
1025
+ XMLPUBFUN xmlAttrPtr
1026
+ xmlSetNsProp (xmlNodePtr node,
1027
+ xmlNsPtr ns,
1028
+ const xmlChar *name,
1029
+ const xmlChar *value);
1030
+ XMLPUBFUN int
1031
+ xmlNodeGetAttrValue (const xmlNode *node,
1032
+ const xmlChar *name,
1033
+ const xmlChar *nsUri,
1034
+ xmlChar **out);
1035
+ XMLPUBFUN xmlChar *
1036
+ xmlGetNoNsProp (const xmlNode *node,
1037
+ const xmlChar *name);
1038
+ XMLPUBFUN xmlChar *
1039
+ xmlGetProp (const xmlNode *node,
1040
+ const xmlChar *name);
1041
+ XMLPUBFUN xmlAttrPtr
1042
+ xmlHasProp (const xmlNode *node,
1043
+ const xmlChar *name);
1044
+ XMLPUBFUN xmlAttrPtr
1045
+ xmlHasNsProp (const xmlNode *node,
1046
+ const xmlChar *name,
1047
+ const xmlChar *nameSpace);
1048
+ XMLPUBFUN xmlChar *
1049
+ xmlGetNsProp (const xmlNode *node,
1050
+ const xmlChar *name,
1051
+ const xmlChar *nameSpace);
1052
+ XMLPUBFUN xmlNodePtr
1053
+ xmlStringGetNodeList (const xmlDoc *doc,
1054
+ const xmlChar *value);
1055
+ XMLPUBFUN xmlNodePtr
1056
+ xmlStringLenGetNodeList (const xmlDoc *doc,
1057
+ const xmlChar *value,
1058
+ int len);
1059
+ XMLPUBFUN xmlChar *
1060
+ xmlNodeListGetString (xmlDocPtr doc,
1061
+ const xmlNode *list,
1062
+ int inLine);
1063
+ XMLPUBFUN xmlChar *
1064
+ xmlNodeListGetRawString (const xmlDoc *doc,
1065
+ const xmlNode *list,
1066
+ int inLine);
1067
+ XMLPUBFUN int
1068
+ xmlNodeSetContent (xmlNodePtr cur,
1069
+ const xmlChar *content);
1070
+ XMLPUBFUN int
1071
+ xmlNodeSetContentLen (xmlNodePtr cur,
1072
+ const xmlChar *content,
1073
+ int len);
1074
+ XMLPUBFUN int
1075
+ xmlNodeAddContent (xmlNodePtr cur,
1076
+ const xmlChar *content);
1077
+ XMLPUBFUN int
1078
+ xmlNodeAddContentLen (xmlNodePtr cur,
1079
+ const xmlChar *content,
1080
+ int len);
1081
+ XMLPUBFUN xmlChar *
1082
+ xmlNodeGetContent (const xmlNode *cur);
1083
+
1084
+ XMLPUBFUN int
1085
+ xmlNodeBufGetContent (xmlBufferPtr buffer,
1086
+ const xmlNode *cur);
1087
+ XMLPUBFUN int
1088
+ xmlBufGetNodeContent (xmlBufPtr buf,
1089
+ const xmlNode *cur);
1090
+
1091
+ XMLPUBFUN xmlChar *
1092
+ xmlNodeGetLang (const xmlNode *cur);
1093
+ XMLPUBFUN int
1094
+ xmlNodeGetSpacePreserve (const xmlNode *cur);
1095
+ XMLPUBFUN int
1096
+ xmlNodeSetLang (xmlNodePtr cur,
1097
+ const xmlChar *lang);
1098
+ XMLPUBFUN int
1099
+ xmlNodeSetSpacePreserve (xmlNodePtr cur,
1100
+ int val);
1101
+ XMLPUBFUN int
1102
+ xmlNodeGetBaseSafe (const xmlDoc *doc,
1103
+ const xmlNode *cur,
1104
+ xmlChar **baseOut);
1105
+ XMLPUBFUN xmlChar *
1106
+ xmlNodeGetBase (const xmlDoc *doc,
1107
+ const xmlNode *cur);
1108
+ XMLPUBFUN int
1109
+ xmlNodeSetBase (xmlNodePtr cur,
1110
+ const xmlChar *uri);
1111
+
1112
+ /*
1113
+ * Removing content.
1114
+ */
1115
+ XMLPUBFUN int
1116
+ xmlRemoveProp (xmlAttrPtr cur);
1117
+ XMLPUBFUN int
1118
+ xmlUnsetNsProp (xmlNodePtr node,
1119
+ xmlNsPtr ns,
1120
+ const xmlChar *name);
1121
+ XMLPUBFUN int
1122
+ xmlUnsetProp (xmlNodePtr node,
1123
+ const xmlChar *name);
1124
+
1125
+ /*
1126
+ * Internal, don't use.
1127
+ */
1128
+ XMLPUBFUN void
1129
+ xmlBufferWriteCHAR (xmlBufferPtr buf,
1130
+ const xmlChar *string);
1131
+ XMLPUBFUN void
1132
+ xmlBufferWriteChar (xmlBufferPtr buf,
1133
+ const char *string);
1134
+ XMLPUBFUN void
1135
+ xmlBufferWriteQuotedString(xmlBufferPtr buf,
1136
+ const xmlChar *string);
1137
+
1138
+ #ifdef LIBXML_OUTPUT_ENABLED
1139
+ XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
1140
+ xmlDocPtr doc,
1141
+ xmlAttrPtr attr,
1142
+ const xmlChar *string);
1143
+ #endif /* LIBXML_OUTPUT_ENABLED */
1144
+
1145
+ /*
1146
+ * Namespace handling.
1147
+ */
1148
+ XMLPUBFUN int
1149
+ xmlReconciliateNs (xmlDocPtr doc,
1150
+ xmlNodePtr tree);
1151
+
1152
+ #ifdef LIBXML_OUTPUT_ENABLED
1153
+ /*
1154
+ * Saving.
1155
+ */
1156
+ XMLPUBFUN void
1157
+ xmlDocDumpFormatMemory (xmlDocPtr cur,
1158
+ xmlChar **mem,
1159
+ int *size,
1160
+ int format);
1161
+ XMLPUBFUN void
1162
+ xmlDocDumpMemory (xmlDocPtr cur,
1163
+ xmlChar **mem,
1164
+ int *size);
1165
+ XMLPUBFUN void
1166
+ xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
1167
+ xmlChar **doc_txt_ptr,
1168
+ int * doc_txt_len,
1169
+ const char *txt_encoding);
1170
+ XMLPUBFUN void
1171
+ xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
1172
+ xmlChar **doc_txt_ptr,
1173
+ int * doc_txt_len,
1174
+ const char *txt_encoding,
1175
+ int format);
1176
+ XMLPUBFUN int
1177
+ xmlDocFormatDump (FILE *f,
1178
+ xmlDocPtr cur,
1179
+ int format);
1180
+ XMLPUBFUN int
1181
+ xmlDocDump (FILE *f,
1182
+ xmlDocPtr cur);
1183
+ XMLPUBFUN void
1184
+ xmlElemDump (FILE *f,
1185
+ xmlDocPtr doc,
1186
+ xmlNodePtr cur);
1187
+ XMLPUBFUN int
1188
+ xmlSaveFile (const char *filename,
1189
+ xmlDocPtr cur);
1190
+ XMLPUBFUN int
1191
+ xmlSaveFormatFile (const char *filename,
1192
+ xmlDocPtr cur,
1193
+ int format);
1194
+ XMLPUBFUN size_t
1195
+ xmlBufNodeDump (xmlBufPtr buf,
1196
+ xmlDocPtr doc,
1197
+ xmlNodePtr cur,
1198
+ int level,
1199
+ int format);
1200
+ XMLPUBFUN int
1201
+ xmlNodeDump (xmlBufferPtr buf,
1202
+ xmlDocPtr doc,
1203
+ xmlNodePtr cur,
1204
+ int level,
1205
+ int format);
1206
+
1207
+ XMLPUBFUN int
1208
+ xmlSaveFileTo (xmlOutputBufferPtr buf,
1209
+ xmlDocPtr cur,
1210
+ const char *encoding);
1211
+ XMLPUBFUN int
1212
+ xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
1213
+ xmlDocPtr cur,
1214
+ const char *encoding,
1215
+ int format);
1216
+ XMLPUBFUN void
1217
+ xmlNodeDumpOutput (xmlOutputBufferPtr buf,
1218
+ xmlDocPtr doc,
1219
+ xmlNodePtr cur,
1220
+ int level,
1221
+ int format,
1222
+ const char *encoding);
1223
+
1224
+ XMLPUBFUN int
1225
+ xmlSaveFormatFileEnc (const char *filename,
1226
+ xmlDocPtr cur,
1227
+ const char *encoding,
1228
+ int format);
1229
+
1230
+ XMLPUBFUN int
1231
+ xmlSaveFileEnc (const char *filename,
1232
+ xmlDocPtr cur,
1233
+ const char *encoding);
1234
+
1235
+ #endif /* LIBXML_OUTPUT_ENABLED */
1236
+ /*
1237
+ * XHTML
1238
+ */
1239
+ XMLPUBFUN int
1240
+ xmlIsXHTML (const xmlChar *systemID,
1241
+ const xmlChar *publicID);
1242
+
1243
+ /*
1244
+ * Compression.
1245
+ */
1246
+ XMLPUBFUN int
1247
+ xmlGetDocCompressMode (const xmlDoc *doc);
1248
+ XMLPUBFUN void
1249
+ xmlSetDocCompressMode (xmlDocPtr doc,
1250
+ int mode);
1251
+ XML_DEPRECATED
1252
+ XMLPUBFUN int
1253
+ xmlGetCompressMode (void);
1254
+ XML_DEPRECATED
1255
+ XMLPUBFUN void
1256
+ xmlSetCompressMode (int mode);
1257
+
1258
+ /*
1259
+ * DOM-wrapper helper functions.
1260
+ */
1261
+ XMLPUBFUN xmlDOMWrapCtxtPtr
1262
+ xmlDOMWrapNewCtxt (void);
1263
+ XMLPUBFUN void
1264
+ xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
1265
+ XMLPUBFUN int
1266
+ xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
1267
+ xmlNodePtr elem,
1268
+ int options);
1269
+ XMLPUBFUN int
1270
+ xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
1271
+ xmlDocPtr sourceDoc,
1272
+ xmlNodePtr node,
1273
+ xmlDocPtr destDoc,
1274
+ xmlNodePtr destParent,
1275
+ int options);
1276
+ XMLPUBFUN int
1277
+ xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
1278
+ xmlDocPtr doc,
1279
+ xmlNodePtr node,
1280
+ int options);
1281
+ XMLPUBFUN int
1282
+ xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt,
1283
+ xmlDocPtr sourceDoc,
1284
+ xmlNodePtr node,
1285
+ xmlNodePtr *clonedNode,
1286
+ xmlDocPtr destDoc,
1287
+ xmlNodePtr destParent,
1288
+ int deep,
1289
+ int options);
1290
+
1291
+ /*
1292
+ * 5 interfaces from DOM ElementTraversal, but different in entities
1293
+ * traversal.
1294
+ */
1295
+ XMLPUBFUN unsigned long
1296
+ xmlChildElementCount (xmlNodePtr parent);
1297
+ XMLPUBFUN xmlNodePtr
1298
+ xmlNextElementSibling (xmlNodePtr node);
1299
+ XMLPUBFUN xmlNodePtr
1300
+ xmlFirstElementChild (xmlNodePtr parent);
1301
+ XMLPUBFUN xmlNodePtr
1302
+ xmlLastElementChild (xmlNodePtr parent);
1303
+ XMLPUBFUN xmlNodePtr
1304
+ xmlPreviousElementSibling (xmlNodePtr node);
1305
+
1306
+ XML_DEPRECATED
1307
+ XMLPUBFUN xmlRegisterNodeFunc
1308
+ xmlRegisterNodeDefault (xmlRegisterNodeFunc func);
1309
+ XML_DEPRECATED
1310
+ XMLPUBFUN xmlDeregisterNodeFunc
1311
+ xmlDeregisterNodeDefault (xmlDeregisterNodeFunc func);
1312
+ XML_DEPRECATED
1313
+ XMLPUBFUN xmlRegisterNodeFunc
1314
+ xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
1315
+ XML_DEPRECATED
1316
+ XMLPUBFUN xmlDeregisterNodeFunc
1317
+ xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
1318
+
1319
+ #ifdef __cplusplus
1320
+ }
1321
+ #endif
1322
+
1323
+ #endif /* __XML_TREE_H__ */
1324
+
1325
+ #endif /* XML_TREE_INTERNALS */
1326
+