lxml 5.3.2__cp39-cp39-macosx_10_9_universal2.whl → 6.0.0__cp39-cp39-macosx_10_9_universal2.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.
- lxml/__init__.py +1 -1
- lxml/_elementpath.cpython-39-darwin.so +0 -0
- lxml/_elementpath.py +3 -1
- lxml/apihelpers.pxi +25 -17
- lxml/builder.cpython-39-darwin.so +0 -0
- lxml/builder.py +11 -0
- lxml/debug.pxi +0 -54
- lxml/etree.cpython-39-darwin.so +0 -0
- lxml/etree.h +24 -28
- lxml/etree.pyx +154 -33
- lxml/etree_api.h +59 -50
- lxml/extensions.pxi +3 -6
- lxml/html/__init__.py +7 -3
- lxml/html/_difflib.cpython-39-darwin.so +0 -0
- lxml/html/_difflib.py +2106 -0
- lxml/html/builder.py +40 -0
- lxml/html/defs.py +3 -3
- lxml/html/diff.cpython-39-darwin.so +0 -0
- lxml/html/diff.py +406 -312
- lxml/includes/etree_defs.h +6 -6
- lxml/includes/libexslt/exsltconfig.h +3 -3
- lxml/includes/libxml/HTMLparser.h +41 -45
- lxml/includes/libxml/HTMLtree.h +1 -0
- lxml/includes/libxml/SAX.h +2 -186
- lxml/includes/libxml/SAX2.h +2 -3
- lxml/includes/libxml/c14n.h +1 -12
- lxml/includes/libxml/catalog.h +1 -0
- lxml/includes/libxml/debugXML.h +0 -138
- lxml/includes/libxml/encoding.h +131 -59
- lxml/includes/libxml/entities.h +12 -20
- lxml/includes/libxml/globals.h +0 -16
- lxml/includes/libxml/hash.h +19 -0
- lxml/includes/libxml/list.h +2 -2
- lxml/includes/libxml/nanoftp.h +3 -173
- lxml/includes/libxml/nanohttp.h +17 -0
- lxml/includes/libxml/parser.h +505 -256
- lxml/includes/libxml/parserInternals.h +26 -98
- lxml/includes/libxml/relaxng.h +7 -2
- lxml/includes/libxml/threads.h +0 -6
- lxml/includes/libxml/tree.h +61 -97
- lxml/includes/libxml/uri.h +11 -0
- lxml/includes/libxml/valid.h +49 -14
- lxml/includes/libxml/xinclude.h +12 -0
- lxml/includes/libxml/xlink.h +4 -0
- lxml/includes/libxml/xmlIO.h +33 -35
- lxml/includes/libxml/xmlautomata.h +19 -2
- lxml/includes/libxml/xmlerror.h +32 -18
- lxml/includes/libxml/xmlexports.h +61 -15
- lxml/includes/libxml/xmlmemory.h +27 -64
- lxml/includes/libxml/xmlmodule.h +4 -0
- lxml/includes/libxml/xmlreader.h +13 -3
- lxml/includes/libxml/xmlregexp.h +7 -106
- lxml/includes/libxml/xmlsave.h +15 -1
- lxml/includes/libxml/xmlschemas.h +10 -5
- lxml/includes/libxml/xmlunicode.h +3 -190
- lxml/includes/libxml/xmlversion.h +15 -194
- lxml/includes/libxml/xmlwriter.h +1 -0
- lxml/includes/libxml/xpath.h +9 -15
- lxml/includes/libxml/xpathInternals.h +9 -3
- lxml/includes/libxml/xpointer.h +1 -91
- lxml/includes/libxslt/xsltconfig.h +6 -6
- lxml/includes/lxml-version.h +1 -1
- lxml/includes/tree.pxd +10 -12
- lxml/includes/xmlparser.pxd +46 -8
- lxml/lxml.etree.h +24 -28
- lxml/lxml.etree_api.h +59 -50
- lxml/objectify.cpython-39-darwin.so +0 -0
- lxml/objectify.pyx +11 -7
- lxml/parser.pxi +106 -47
- lxml/sax.cpython-39-darwin.so +0 -0
- lxml/sax.py +11 -0
- lxml/saxparser.pxi +14 -14
- lxml/schematron.pxi +8 -3
- lxml/serializer.pxi +71 -3
- lxml/xslt.pxi +10 -3
- lxml-6.0.0.dist-info/METADATA +163 -0
- {lxml-5.3.2.dist-info → lxml-6.0.0.dist-info}/RECORD +81 -79
- {lxml-5.3.2.dist-info → lxml-6.0.0.dist-info}/WHEEL +2 -1
- {lxml-5.3.2.dist-info → lxml-6.0.0.dist-info}/licenses/LICENSE.txt +3 -1
- lxml-5.3.2.dist-info/METADATA +0 -100
- {lxml-5.3.2.dist-info → lxml-6.0.0.dist-info}/licenses/LICENSES.txt +0 -0
- {lxml-5.3.2.dist-info → lxml-6.0.0.dist-info}/top_level.txt +0 -0
lxml/includes/libxml/parser.h
CHANGED
@@ -10,6 +10,7 @@
|
|
10
10
|
#ifndef __XML_PARSER_H__
|
11
11
|
#define __XML_PARSER_H__
|
12
12
|
|
13
|
+
/** DOC_DISABLE */
|
13
14
|
#include <libxml/xmlversion.h>
|
14
15
|
#define XML_TREE_INTERNALS
|
15
16
|
#include <libxml/tree.h>
|
@@ -26,6 +27,7 @@
|
|
26
27
|
/* for compatibility */
|
27
28
|
#include <libxml/SAX2.h>
|
28
29
|
#include <libxml/threads.h>
|
30
|
+
/** DOC_ENABLE */
|
29
31
|
|
30
32
|
#ifdef __cplusplus
|
31
33
|
extern "C" {
|
@@ -38,6 +40,30 @@ extern "C" {
|
|
38
40
|
*/
|
39
41
|
#define XML_DEFAULT_VERSION "1.0"
|
40
42
|
|
43
|
+
typedef enum {
|
44
|
+
XML_STATUS_NOT_WELL_FORMED = (1 << 0),
|
45
|
+
XML_STATUS_NOT_NS_WELL_FORMED = (1 << 1),
|
46
|
+
XML_STATUS_DTD_VALIDATION_FAILED = (1 << 2),
|
47
|
+
XML_STATUS_CATASTROPHIC_ERROR = (1 << 3)
|
48
|
+
} xmlParserStatus;
|
49
|
+
|
50
|
+
typedef enum {
|
51
|
+
XML_RESOURCE_UNKNOWN = 0,
|
52
|
+
XML_RESOURCE_MAIN_DOCUMENT,
|
53
|
+
XML_RESOURCE_DTD,
|
54
|
+
XML_RESOURCE_GENERAL_ENTITY,
|
55
|
+
XML_RESOURCE_PARAMETER_ENTITY,
|
56
|
+
XML_RESOURCE_XINCLUDE,
|
57
|
+
XML_RESOURCE_XINCLUDE_TEXT
|
58
|
+
} xmlResourceType;
|
59
|
+
|
60
|
+
typedef enum {
|
61
|
+
XML_INPUT_BUF_STATIC = (1 << 1),
|
62
|
+
XML_INPUT_BUF_ZERO_TERMINATED = (1 << 2),
|
63
|
+
XML_INPUT_UNZIP = (1 << 3),
|
64
|
+
XML_INPUT_NETWORK = (1 << 4)
|
65
|
+
} xmlParserInputFlags;
|
66
|
+
|
41
67
|
/**
|
42
68
|
* xmlParserInput:
|
43
69
|
*
|
@@ -59,24 +85,39 @@ typedef void (* xmlParserInputDeallocate)(xmlChar *str);
|
|
59
85
|
|
60
86
|
struct _xmlParserInput {
|
61
87
|
/* Input buffer */
|
62
|
-
xmlParserInputBufferPtr buf;
|
63
|
-
|
64
|
-
const char *filename;
|
65
|
-
|
66
|
-
const
|
67
|
-
|
68
|
-
const xmlChar *
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
int
|
77
|
-
|
78
|
-
|
79
|
-
|
88
|
+
xmlParserInputBufferPtr buf;
|
89
|
+
/* The file analyzed, if any */
|
90
|
+
const char *filename;
|
91
|
+
/* unused */
|
92
|
+
const char *directory XML_DEPRECATED_MEMBER;
|
93
|
+
/* Base of the array to parse */
|
94
|
+
const xmlChar *base;
|
95
|
+
/* Current char being parsed */
|
96
|
+
const xmlChar *cur;
|
97
|
+
/* end of the array to parse */
|
98
|
+
const xmlChar *end;
|
99
|
+
/* unused */
|
100
|
+
int length XML_DEPRECATED_MEMBER;
|
101
|
+
/* Current line */
|
102
|
+
int line;
|
103
|
+
/* Current column */
|
104
|
+
int col;
|
105
|
+
/* How many xmlChars already consumed */
|
106
|
+
unsigned long consumed;
|
107
|
+
/* function to deallocate the base */
|
108
|
+
xmlParserInputDeallocate free XML_DEPRECATED_MEMBER;
|
109
|
+
/* unused */
|
110
|
+
const xmlChar *encoding XML_DEPRECATED_MEMBER;
|
111
|
+
/* the version string for entity */
|
112
|
+
const xmlChar *version XML_DEPRECATED_MEMBER;
|
113
|
+
/* Flags */
|
114
|
+
int flags XML_DEPRECATED_MEMBER;
|
115
|
+
/* an unique identifier for the entity */
|
116
|
+
int id XML_DEPRECATED_MEMBER;
|
117
|
+
/* unused */
|
118
|
+
unsigned long parentConsumed XML_DEPRECATED_MEMBER;
|
119
|
+
/* entity, if any */
|
120
|
+
xmlEntityPtr entity XML_DEPRECATED_MEMBER;
|
80
121
|
};
|
81
122
|
|
82
123
|
/**
|
@@ -134,30 +175,14 @@ typedef enum {
|
|
134
175
|
XML_PARSER_XML_DECL /* before XML decl (but after BOM) */
|
135
176
|
} xmlParserInputState;
|
136
177
|
|
137
|
-
/**
|
138
|
-
|
139
|
-
*
|
140
|
-
* Bit in the loadsubset context field to tell to do ID/REFs lookups.
|
141
|
-
* Use it to initialize xmlLoadExtDtdDefaultValue.
|
178
|
+
/** DOC_DISABLE */
|
179
|
+
/*
|
180
|
+
* Internal bits in the 'loadsubset' context member
|
142
181
|
*/
|
143
182
|
#define XML_DETECT_IDS 2
|
144
|
-
|
145
|
-
/**
|
146
|
-
* XML_COMPLETE_ATTRS:
|
147
|
-
*
|
148
|
-
* Bit in the loadsubset context field to tell to do complete the
|
149
|
-
* elements attributes lists with the ones defaulted from the DTDs.
|
150
|
-
* Use it to initialize xmlLoadExtDtdDefaultValue.
|
151
|
-
*/
|
152
183
|
#define XML_COMPLETE_ATTRS 4
|
153
|
-
|
154
|
-
/**
|
155
|
-
* XML_SKIP_IDS:
|
156
|
-
*
|
157
|
-
* Bit in the loadsubset context field to tell to not do ID/REFs registration.
|
158
|
-
* Used to initialize xmlLoadExtDtdDefaultValue in some special cases.
|
159
|
-
*/
|
160
184
|
#define XML_SKIP_IDS 8
|
185
|
+
/** DOC_ENABLE */
|
161
186
|
|
162
187
|
/**
|
163
188
|
* xmlParserMode:
|
@@ -177,6 +202,29 @@ typedef struct _xmlStartTag xmlStartTag;
|
|
177
202
|
typedef struct _xmlParserNsData xmlParserNsData;
|
178
203
|
typedef struct _xmlAttrHashBucket xmlAttrHashBucket;
|
179
204
|
|
205
|
+
/**
|
206
|
+
* xmlResourceLoader:
|
207
|
+
* @ctxt: parser context
|
208
|
+
* @url: URL to load
|
209
|
+
* @publicId: publid ID from DTD (optional)
|
210
|
+
* @type: resource type
|
211
|
+
* @flags: flags
|
212
|
+
* @out: result pointer
|
213
|
+
*
|
214
|
+
* Callback for custom resource loaders.
|
215
|
+
*
|
216
|
+
* @flags can contain XML_INPUT_UNZIP and XML_INPUT_NETWORK.
|
217
|
+
*
|
218
|
+
* On success, @out should be set to a new parser input object and
|
219
|
+
* XML_ERR_OK should be returned.
|
220
|
+
*
|
221
|
+
* Returns an xmlParserErrors code.
|
222
|
+
*/
|
223
|
+
typedef xmlParserErrors
|
224
|
+
(*xmlResourceLoader)(void *ctxt, const char *url, const char *publicId,
|
225
|
+
xmlResourceType type, xmlParserInputFlags flags,
|
226
|
+
xmlParserInputPtr *out);
|
227
|
+
|
180
228
|
/**
|
181
229
|
* xmlParserCtxt:
|
182
230
|
*
|
@@ -190,143 +238,251 @@ typedef struct _xmlAttrHashBucket xmlAttrHashBucket;
|
|
190
238
|
* to a state based parser for progressive parsing shouldn't be too hard.
|
191
239
|
*/
|
192
240
|
struct _xmlParserCtxt {
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
int
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
241
|
+
/* The SAX handler */
|
242
|
+
struct _xmlSAXHandler *sax;
|
243
|
+
/* For SAX interface only, used by DOM build */
|
244
|
+
void *userData;
|
245
|
+
/* the document being built */
|
246
|
+
xmlDocPtr myDoc;
|
247
|
+
/* is the document well formed */
|
248
|
+
int wellFormed;
|
249
|
+
/* shall we replace entities ? */
|
250
|
+
int replaceEntities XML_DEPRECATED_MEMBER;
|
251
|
+
/* the XML version string */
|
252
|
+
const xmlChar *version;
|
253
|
+
/* the declared encoding, if any */
|
254
|
+
const xmlChar *encoding;
|
255
|
+
/* standalone document */
|
256
|
+
int standalone;
|
257
|
+
|
258
|
+
/* an HTML(1) document
|
259
|
+
* 3 is HTML after <head>
|
260
|
+
* 10 is HTML after <body>
|
261
|
+
*/
|
262
|
+
int html;
|
205
263
|
|
206
264
|
/* Input stream stack */
|
207
|
-
xmlParserInputPtr input; /* Current input stream */
|
208
|
-
int inputNr; /* Number of current input streams */
|
209
|
-
int inputMax; /* Max number of input streams */
|
210
|
-
xmlParserInputPtr *inputTab; /* stack of inputs */
|
211
|
-
|
212
|
-
/* Node analysis stack only used for DOM building */
|
213
|
-
xmlNodePtr node; /* Current parsed Node */
|
214
|
-
int nodeNr; /* Depth of the parsing stack */
|
215
|
-
int nodeMax; /* Max depth of the parsing stack */
|
216
|
-
xmlNodePtr *nodeTab; /* array of nodes */
|
217
265
|
|
218
|
-
|
219
|
-
|
266
|
+
/* Current input stream */
|
267
|
+
xmlParserInputPtr input;
|
268
|
+
/* Number of current input streams */
|
269
|
+
int inputNr;
|
270
|
+
/* Max number of input streams */
|
271
|
+
int inputMax XML_DEPRECATED_MEMBER;
|
272
|
+
/* stack of inputs */
|
273
|
+
xmlParserInputPtr *inputTab;
|
220
274
|
|
221
|
-
|
275
|
+
/* Node analysis stack only used for DOM building */
|
222
276
|
|
223
|
-
|
224
|
-
|
225
|
-
|
277
|
+
/* Current parsed Node */
|
278
|
+
xmlNodePtr node;
|
279
|
+
/* Depth of the parsing stack */
|
280
|
+
int nodeNr XML_DEPRECATED_MEMBER;
|
281
|
+
/* Max depth of the parsing stack */
|
282
|
+
int nodeMax XML_DEPRECATED_MEMBER;
|
283
|
+
/* array of nodes */
|
284
|
+
xmlNodePtr *nodeTab XML_DEPRECATED_MEMBER;
|
285
|
+
|
286
|
+
/* Whether node info should be kept */
|
287
|
+
int record_info;
|
288
|
+
/* info about each node parsed */
|
289
|
+
xmlParserNodeInfoSeq node_seq XML_DEPRECATED_MEMBER;
|
290
|
+
|
291
|
+
/* error code */
|
292
|
+
int errNo;
|
293
|
+
|
294
|
+
/* reference and external subset */
|
295
|
+
int hasExternalSubset XML_DEPRECATED_MEMBER;
|
296
|
+
/* the internal subset has PE refs */
|
297
|
+
int hasPErefs XML_DEPRECATED_MEMBER;
|
298
|
+
/* unused */
|
299
|
+
int external XML_DEPRECATED_MEMBER;
|
300
|
+
|
301
|
+
/* is the document valid */
|
302
|
+
int valid;
|
303
|
+
/* shall we try to validate ? */
|
304
|
+
int validate XML_DEPRECATED_MEMBER;
|
305
|
+
/* The validity context */
|
306
|
+
xmlValidCtxt vctxt;
|
307
|
+
|
308
|
+
/* push parser state */
|
309
|
+
xmlParserInputState instate XML_DEPRECATED_MEMBER;
|
310
|
+
/* unused */
|
311
|
+
int token XML_DEPRECATED_MEMBER;
|
312
|
+
|
313
|
+
/* unused internally, still used downstream */
|
314
|
+
char *directory;
|
226
315
|
|
227
|
-
|
228
|
-
int validate; /* shall we try to validate ? */
|
229
|
-
xmlValidCtxt vctxt; /* The validity context */
|
316
|
+
/* Node name stack */
|
230
317
|
|
231
|
-
|
232
|
-
|
318
|
+
/* Current parsed Node */
|
319
|
+
const xmlChar *name XML_DEPRECATED_MEMBER;
|
320
|
+
/* Depth of the parsing stack */
|
321
|
+
int nameNr XML_DEPRECATED_MEMBER;
|
322
|
+
/* Max depth of the parsing stack */
|
323
|
+
int nameMax XML_DEPRECATED_MEMBER;
|
324
|
+
/* array of nodes */
|
325
|
+
const xmlChar **nameTab XML_DEPRECATED_MEMBER;
|
326
|
+
|
327
|
+
/* unused */
|
328
|
+
long nbChars XML_DEPRECATED_MEMBER;
|
329
|
+
/* used by progressive parsing lookup */
|
330
|
+
long checkIndex XML_DEPRECATED_MEMBER;
|
331
|
+
/* ugly but ... */
|
332
|
+
int keepBlanks XML_DEPRECATED_MEMBER;
|
333
|
+
/* SAX callbacks are disabled */
|
334
|
+
int disableSAX;
|
335
|
+
/* Parsing is in int 1/ext 2 subset */
|
336
|
+
int inSubset;
|
337
|
+
/* name of subset */
|
338
|
+
const xmlChar *intSubName;
|
339
|
+
/* URI of external subset */
|
340
|
+
xmlChar *extSubURI;
|
341
|
+
/* SYSTEM ID of external subset */
|
342
|
+
xmlChar *extSubSystem;
|
233
343
|
|
234
|
-
|
344
|
+
/* xml:space values */
|
235
345
|
|
236
|
-
/*
|
237
|
-
|
238
|
-
|
239
|
-
int
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
int
|
247
|
-
|
248
|
-
|
249
|
-
|
346
|
+
/* Should the parser preserve spaces */
|
347
|
+
int *space XML_DEPRECATED_MEMBER;
|
348
|
+
/* Depth of the parsing stack */
|
349
|
+
int spaceNr XML_DEPRECATED_MEMBER;
|
350
|
+
/* Max depth of the parsing stack */
|
351
|
+
int spaceMax XML_DEPRECATED_MEMBER;
|
352
|
+
/* array of space infos */
|
353
|
+
int *spaceTab XML_DEPRECATED_MEMBER;
|
354
|
+
|
355
|
+
/* to prevent entity substitution loops */
|
356
|
+
int depth XML_DEPRECATED_MEMBER;
|
357
|
+
/* unused */
|
358
|
+
xmlParserInputPtr entity XML_DEPRECATED_MEMBER;
|
359
|
+
/* unused */
|
360
|
+
int charset XML_DEPRECATED_MEMBER;
|
361
|
+
/* Those two fields are there to */
|
362
|
+
int nodelen XML_DEPRECATED_MEMBER;
|
363
|
+
/* Speed up large node parsing */
|
364
|
+
int nodemem XML_DEPRECATED_MEMBER;
|
365
|
+
/* signal pedantic warnings */
|
366
|
+
int pedantic XML_DEPRECATED_MEMBER;
|
367
|
+
/* For user data, libxml won't touch it */
|
368
|
+
void *_private;
|
250
369
|
|
251
|
-
/*
|
252
|
-
int
|
253
|
-
|
254
|
-
int
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
int
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
int
|
267
|
-
|
268
|
-
int
|
269
|
-
int progressive; /* is this a progressive parsing */
|
270
|
-
xmlDictPtr dict; /* dictionary for the parser */
|
271
|
-
const xmlChar * *atts; /* array for the attributes callbacks */
|
272
|
-
int maxatts; /* the size of the array */
|
273
|
-
int docdict; /* use strings from dict to build tree */
|
370
|
+
/* should the external subset be loaded */
|
371
|
+
int loadsubset;
|
372
|
+
/* set line number in element content */
|
373
|
+
int linenumbers XML_DEPRECATED_MEMBER;
|
374
|
+
/* document's own catalog */
|
375
|
+
void *catalogs XML_DEPRECATED_MEMBER;
|
376
|
+
/* run in recovery mode */
|
377
|
+
int recovery XML_DEPRECATED_MEMBER;
|
378
|
+
/* unused */
|
379
|
+
int progressive XML_DEPRECATED_MEMBER;
|
380
|
+
/* dictionary for the parser */
|
381
|
+
xmlDictPtr dict;
|
382
|
+
/* array for the attributes callbacks */
|
383
|
+
const xmlChar **atts XML_DEPRECATED_MEMBER;
|
384
|
+
/* the size of the array */
|
385
|
+
int maxatts XML_DEPRECATED_MEMBER;
|
386
|
+
/* unused */
|
387
|
+
int docdict XML_DEPRECATED_MEMBER;
|
274
388
|
|
275
389
|
/*
|
276
390
|
* pre-interned strings
|
277
391
|
*/
|
278
|
-
const xmlChar *str_xml;
|
279
|
-
const xmlChar *str_xmlns;
|
280
|
-
const xmlChar *str_xml_ns;
|
392
|
+
const xmlChar *str_xml XML_DEPRECATED_MEMBER;
|
393
|
+
const xmlChar *str_xmlns XML_DEPRECATED_MEMBER;
|
394
|
+
const xmlChar *str_xml_ns XML_DEPRECATED_MEMBER;
|
281
395
|
|
282
396
|
/*
|
283
397
|
* Everything below is used only by the new SAX mode
|
284
398
|
*/
|
285
|
-
|
286
|
-
|
287
|
-
int
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
399
|
+
|
400
|
+
/* operating in the new SAX mode */
|
401
|
+
int sax2 XML_DEPRECATED_MEMBER;
|
402
|
+
/* the number of inherited namespaces */
|
403
|
+
int nsNr XML_DEPRECATED_MEMBER;
|
404
|
+
/* the size of the arrays */
|
405
|
+
int nsMax XML_DEPRECATED_MEMBER;
|
406
|
+
/* the array of prefix/namespace name */
|
407
|
+
const xmlChar **nsTab XML_DEPRECATED_MEMBER;
|
408
|
+
/* which attribute were allocated */
|
409
|
+
unsigned *attallocs XML_DEPRECATED_MEMBER;
|
410
|
+
/* array of data for push */
|
411
|
+
xmlStartTag *pushTab XML_DEPRECATED_MEMBER;
|
412
|
+
/* defaulted attributes if any */
|
413
|
+
xmlHashTablePtr attsDefault XML_DEPRECATED_MEMBER;
|
414
|
+
/* non-CDATA attributes if any */
|
415
|
+
xmlHashTablePtr attsSpecial XML_DEPRECATED_MEMBER;
|
416
|
+
/* is the document XML Namespace okay */
|
417
|
+
int nsWellFormed;
|
418
|
+
/* Extra options */
|
419
|
+
int options;
|
295
420
|
|
296
421
|
/*
|
297
422
|
* Those fields are needed only for streaming parsing so far
|
298
423
|
*/
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
424
|
+
|
425
|
+
/* Use dictionary names for the tree */
|
426
|
+
int dictNames XML_DEPRECATED_MEMBER;
|
427
|
+
/* number of freed element nodes */
|
428
|
+
int freeElemsNr XML_DEPRECATED_MEMBER;
|
429
|
+
/* List of freed element nodes */
|
430
|
+
xmlNodePtr freeElems XML_DEPRECATED_MEMBER;
|
431
|
+
/* number of freed attributes nodes */
|
432
|
+
int freeAttrsNr XML_DEPRECATED_MEMBER;
|
433
|
+
/* List of freed attributes nodes */
|
434
|
+
xmlAttrPtr freeAttrs XML_DEPRECATED_MEMBER;
|
304
435
|
|
305
436
|
/*
|
306
437
|
* the complete error information for the last error.
|
307
438
|
*/
|
308
|
-
xmlError
|
309
|
-
|
310
|
-
|
311
|
-
|
439
|
+
xmlError lastError XML_DEPRECATED_MEMBER;
|
440
|
+
/* the parser mode */
|
441
|
+
xmlParserMode parseMode XML_DEPRECATED_MEMBER;
|
442
|
+
/* unused */
|
443
|
+
unsigned long nbentities XML_DEPRECATED_MEMBER;
|
444
|
+
/* size of external entities */
|
445
|
+
unsigned long sizeentities XML_DEPRECATED_MEMBER;
|
312
446
|
|
313
447
|
/* for use by HTML non-recursive parser */
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
int
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
448
|
+
/* Current NodeInfo */
|
449
|
+
xmlParserNodeInfo *nodeInfo XML_DEPRECATED_MEMBER;
|
450
|
+
/* Depth of the parsing stack */
|
451
|
+
int nodeInfoNr XML_DEPRECATED_MEMBER;
|
452
|
+
/* Max depth of the parsing stack */
|
453
|
+
int nodeInfoMax XML_DEPRECATED_MEMBER;
|
454
|
+
/* array of nodeInfos */
|
455
|
+
xmlParserNodeInfo *nodeInfoTab XML_DEPRECATED_MEMBER;
|
456
|
+
|
457
|
+
/* we need to label inputs */
|
458
|
+
int input_id XML_DEPRECATED_MEMBER;
|
459
|
+
/* volume of entity copy */
|
460
|
+
unsigned long sizeentcopy XML_DEPRECATED_MEMBER;
|
461
|
+
|
462
|
+
/* quote state for push parser */
|
463
|
+
int endCheckState XML_DEPRECATED_MEMBER;
|
464
|
+
/* number of errors */
|
465
|
+
unsigned short nbErrors XML_DEPRECATED_MEMBER;
|
466
|
+
/* number of warnings */
|
467
|
+
unsigned short nbWarnings XML_DEPRECATED_MEMBER;
|
468
|
+
/* maximum amplification factor */
|
469
|
+
unsigned maxAmpl XML_DEPRECATED_MEMBER;
|
470
|
+
|
471
|
+
/* namespace database */
|
472
|
+
xmlParserNsData *nsdb XML_DEPRECATED_MEMBER;
|
473
|
+
/* allocated size */
|
474
|
+
unsigned attrHashMax XML_DEPRECATED_MEMBER;
|
475
|
+
/* atttribute hash table */
|
476
|
+
xmlAttrHashBucket *attrHash XML_DEPRECATED_MEMBER;
|
477
|
+
|
478
|
+
xmlStructuredErrorFunc errorHandler XML_DEPRECATED_MEMBER;
|
479
|
+
void *errorCtxt XML_DEPRECATED_MEMBER;
|
480
|
+
|
481
|
+
xmlResourceLoader resourceLoader XML_DEPRECATED_MEMBER;
|
482
|
+
void *resourceCtxt XML_DEPRECATED_MEMBER;
|
483
|
+
|
484
|
+
xmlCharEncConvImpl convImpl XML_DEPRECATED_MEMBER;
|
485
|
+
void *convCtxt XML_DEPRECATED_MEMBER;
|
330
486
|
};
|
331
487
|
|
332
488
|
/**
|
@@ -733,18 +889,23 @@ typedef void (*endElementNsSAX2Func) (void *ctx,
|
|
733
889
|
|
734
890
|
|
735
891
|
struct _xmlSAXHandler {
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
892
|
+
/*
|
893
|
+
* For DTD-related handlers, it's recommended to either use the
|
894
|
+
* original libxml2 handler or set them to NULL if DTDs can be
|
895
|
+
* ignored.
|
896
|
+
*/
|
897
|
+
internalSubsetSAXFunc internalSubset; /* DTD */
|
898
|
+
isStandaloneSAXFunc isStandalone; /* unused */
|
899
|
+
hasInternalSubsetSAXFunc hasInternalSubset; /* DTD */
|
900
|
+
hasExternalSubsetSAXFunc hasExternalSubset; /* DTD */
|
901
|
+
resolveEntitySAXFunc resolveEntity; /* DTD */
|
902
|
+
getEntitySAXFunc getEntity; /* DTD */
|
903
|
+
entityDeclSAXFunc entityDecl; /* DTD */
|
904
|
+
notationDeclSAXFunc notationDecl; /* DTD */
|
905
|
+
attributeDeclSAXFunc attributeDecl; /* DTD */
|
906
|
+
elementDeclSAXFunc elementDecl; /* DTD */
|
907
|
+
unparsedEntityDeclSAXFunc unparsedEntityDecl; /* DTD */
|
908
|
+
setDocumentLocatorSAXFunc setDocumentLocator; /* deprecated */
|
748
909
|
startDocumentSAXFunc startDocument;
|
749
910
|
endDocumentSAXFunc endDocument;
|
750
911
|
/*
|
@@ -764,15 +925,20 @@ struct _xmlSAXHandler {
|
|
764
925
|
endElementSAXFunc endElement;
|
765
926
|
referenceSAXFunc reference;
|
766
927
|
charactersSAXFunc characters;
|
928
|
+
/*
|
929
|
+
* `ignorableWhitespace` should always be set to the same value
|
930
|
+
* as `characters`. Otherwise, the parser will try to detect
|
931
|
+
* whitespace which is unreliable.
|
932
|
+
*/
|
767
933
|
ignorableWhitespaceSAXFunc ignorableWhitespace;
|
768
934
|
processingInstructionSAXFunc processingInstruction;
|
769
935
|
commentSAXFunc comment;
|
770
936
|
warningSAXFunc warning;
|
771
937
|
errorSAXFunc error;
|
772
|
-
fatalErrorSAXFunc fatalError; /* unused error
|
773
|
-
getParameterEntitySAXFunc getParameterEntity;
|
938
|
+
fatalErrorSAXFunc fatalError; /* unused, `error` gets all the errors */
|
939
|
+
getParameterEntitySAXFunc getParameterEntity; /* DTD */
|
774
940
|
cdataBlockSAXFunc cdataBlock;
|
775
|
-
externalSubsetSAXFunc externalSubset;
|
941
|
+
externalSubsetSAXFunc externalSubset; /* DTD */
|
776
942
|
/*
|
777
943
|
* `initialized` should always be set to XML_SAX2_MAGIC to enable the
|
778
944
|
* modern SAX2 interface.
|
@@ -784,6 +950,10 @@ struct _xmlSAXHandler {
|
|
784
950
|
void *_private;
|
785
951
|
startElementNsSAX2Func startElementNs;
|
786
952
|
endElementNsSAX2Func endElementNs;
|
953
|
+
/*
|
954
|
+
* Takes precedence over `error` or `warning`, but modern code
|
955
|
+
* should use xmlCtxtSetErrorHandler.
|
956
|
+
*/
|
787
957
|
xmlStructuredErrorFunc serror;
|
788
958
|
};
|
789
959
|
|
@@ -843,70 +1013,53 @@ typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
|
|
843
1013
|
*/
|
844
1014
|
|
845
1015
|
XMLPUBVAR const char *const xmlParserVersion;
|
846
|
-
#ifdef LIBXML_THREAD_ENABLED
|
847
|
-
/* backward compatibility */
|
848
|
-
XMLPUBFUN const char *const *__xmlParserVersion(void);
|
849
|
-
#endif
|
850
1016
|
|
851
1017
|
/** DOC_DISABLE */
|
852
|
-
|
853
|
-
|
854
|
-
XML_OP(xmlDefaultSAXLocator, xmlSAXLocator, XML_DEPRECATED) \
|
855
|
-
XML_OP(xmlDoValidityCheckingDefaultValue, int, XML_DEPRECATED) \
|
856
|
-
XML_OP(xmlGetWarningsDefaultValue, int, XML_DEPRECATED) \
|
857
|
-
XML_OP(xmlKeepBlanksDefaultValue, int, XML_DEPRECATED) \
|
858
|
-
XML_OP(xmlLineNumbersDefaultValue, int, XML_DEPRECATED) \
|
859
|
-
XML_OP(xmlLoadExtDtdDefaultValue, int, XML_DEPRECATED) \
|
860
|
-
XML_OP(xmlParserDebugEntities, int, XML_DEPRECATED) \
|
861
|
-
XML_OP(xmlPedanticParserDefaultValue, int, XML_DEPRECATED) \
|
862
|
-
XML_OP(xmlSubstituteEntitiesDefaultValue, int, XML_DEPRECATED)
|
863
|
-
|
864
|
-
#ifdef LIBXML_OUTPUT_ENABLED
|
865
|
-
#define XML_GLOBALS_PARSER_OUTPUT \
|
866
|
-
XML_OP(xmlIndentTreeOutput, int, XML_NO_ATTR) \
|
867
|
-
XML_OP(xmlTreeIndentString, const char *, XML_NO_ATTR) \
|
868
|
-
XML_OP(xmlSaveNoEmptyTags, int, XML_NO_ATTR)
|
869
|
-
#else
|
870
|
-
#define XML_GLOBALS_PARSER_OUTPUT
|
871
|
-
#endif
|
872
|
-
|
1018
|
+
XML_DEPRECATED
|
1019
|
+
XMLPUBVAR const xmlSAXLocator xmlDefaultSAXLocator;
|
873
1020
|
#ifdef LIBXML_SAX1_ENABLED
|
874
|
-
|
875
|
-
|
876
|
-
#else
|
877
|
-
#define XML_GLOBALS_PARSER_SAX1
|
1021
|
+
XML_DEPRECATED
|
1022
|
+
XMLPUBVAR const xmlSAXHandlerV1 xmlDefaultSAXHandler;
|
878
1023
|
#endif
|
879
1024
|
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
1025
|
+
XML_DEPRECATED
|
1026
|
+
XMLPUBFUN int *__xmlDoValidityCheckingDefaultValue(void);
|
1027
|
+
XML_DEPRECATED
|
1028
|
+
XMLPUBFUN int *__xmlGetWarningsDefaultValue(void);
|
1029
|
+
XML_DEPRECATED
|
1030
|
+
XMLPUBFUN int *__xmlKeepBlanksDefaultValue(void);
|
1031
|
+
XML_DEPRECATED
|
1032
|
+
XMLPUBFUN int *__xmlLineNumbersDefaultValue(void);
|
1033
|
+
XML_DEPRECATED
|
1034
|
+
XMLPUBFUN int *__xmlLoadExtDtdDefaultValue(void);
|
1035
|
+
XML_DEPRECATED
|
1036
|
+
XMLPUBFUN int *__xmlPedanticParserDefaultValue(void);
|
1037
|
+
XML_DEPRECATED
|
1038
|
+
XMLPUBFUN int *__xmlSubstituteEntitiesDefaultValue(void);
|
884
1039
|
|
885
|
-
#
|
886
|
-
|
887
|
-
|
1040
|
+
#ifdef LIBXML_OUTPUT_ENABLED
|
1041
|
+
XMLPUBFUN int *__xmlIndentTreeOutput(void);
|
1042
|
+
XMLPUBFUN const char **__xmlTreeIndentString(void);
|
1043
|
+
XMLPUBFUN int *__xmlSaveNoEmptyTags(void);
|
1044
|
+
#endif
|
888
1045
|
|
889
|
-
#
|
890
|
-
#define oldXMLWDcompatibility XML_GLOBAL_MACRO(oldXMLWDcompatibility)
|
891
|
-
#define xmlDefaultSAXHandler XML_GLOBAL_MACRO(xmlDefaultSAXHandler)
|
892
|
-
#define xmlDefaultSAXLocator XML_GLOBAL_MACRO(xmlDefaultSAXLocator)
|
1046
|
+
#ifndef XML_GLOBALS_NO_REDEFINITION
|
893
1047
|
#define xmlDoValidityCheckingDefaultValue \
|
894
|
-
|
1048
|
+
(*__xmlDoValidityCheckingDefaultValue())
|
895
1049
|
#define xmlGetWarningsDefaultValue \
|
896
|
-
|
897
|
-
#define xmlKeepBlanksDefaultValue
|
1050
|
+
(*__xmlGetWarningsDefaultValue())
|
1051
|
+
#define xmlKeepBlanksDefaultValue (*__xmlKeepBlanksDefaultValue())
|
898
1052
|
#define xmlLineNumbersDefaultValue \
|
899
|
-
|
900
|
-
#define xmlLoadExtDtdDefaultValue
|
901
|
-
#define xmlParserDebugEntities XML_GLOBAL_MACRO(xmlParserDebugEntities)
|
1053
|
+
(*__xmlLineNumbersDefaultValue())
|
1054
|
+
#define xmlLoadExtDtdDefaultValue (*__xmlLoadExtDtdDefaultValue())
|
902
1055
|
#define xmlPedanticParserDefaultValue \
|
903
|
-
|
1056
|
+
(*__xmlPedanticParserDefaultValue())
|
904
1057
|
#define xmlSubstituteEntitiesDefaultValue \
|
905
|
-
|
1058
|
+
(*__xmlSubstituteEntitiesDefaultValue())
|
906
1059
|
#ifdef LIBXML_OUTPUT_ENABLED
|
907
|
-
#define xmlIndentTreeOutput
|
908
|
-
#define xmlTreeIndentString
|
909
|
-
#define xmlSaveNoEmptyTags
|
1060
|
+
#define xmlIndentTreeOutput (*__xmlIndentTreeOutput())
|
1061
|
+
#define xmlTreeIndentString (*__xmlTreeIndentString())
|
1062
|
+
#define xmlSaveNoEmptyTags (*__xmlSaveNoEmptyTags())
|
910
1063
|
#endif
|
911
1064
|
#endif
|
912
1065
|
/** DOC_ENABLE */
|
@@ -932,7 +1085,6 @@ XML_DEPRECATED
|
|
932
1085
|
XMLPUBFUN int
|
933
1086
|
xmlParserInputRead (xmlParserInputPtr in,
|
934
1087
|
int len);
|
935
|
-
XML_DEPRECATED
|
936
1088
|
XMLPUBFUN int
|
937
1089
|
xmlParserInputGrow (xmlParserInputPtr in,
|
938
1090
|
int len);
|
@@ -949,32 +1101,40 @@ XMLPUBFUN xmlDocPtr
|
|
949
1101
|
xmlParseMemory (const char *buffer,
|
950
1102
|
int size);
|
951
1103
|
#endif /* LIBXML_SAX1_ENABLED */
|
952
|
-
XML_DEPRECATED
|
1104
|
+
XML_DEPRECATED
|
1105
|
+
XMLPUBFUN int
|
953
1106
|
xmlSubstituteEntitiesDefault(int val);
|
954
|
-
XML_DEPRECATED
|
1107
|
+
XML_DEPRECATED
|
1108
|
+
XMLPUBFUN int
|
955
1109
|
xmlThrDefSubstituteEntitiesDefaultValue(int v);
|
956
1110
|
XMLPUBFUN int
|
957
1111
|
xmlKeepBlanksDefault (int val);
|
958
|
-
XML_DEPRECATED
|
1112
|
+
XML_DEPRECATED
|
1113
|
+
XMLPUBFUN int
|
959
1114
|
xmlThrDefKeepBlanksDefaultValue(int v);
|
960
1115
|
XMLPUBFUN void
|
961
1116
|
xmlStopParser (xmlParserCtxtPtr ctxt);
|
962
|
-
XML_DEPRECATED
|
1117
|
+
XML_DEPRECATED
|
1118
|
+
XMLPUBFUN int
|
963
1119
|
xmlPedanticParserDefault(int val);
|
964
|
-
XML_DEPRECATED
|
1120
|
+
XML_DEPRECATED
|
1121
|
+
XMLPUBFUN int
|
965
1122
|
xmlThrDefPedanticParserDefaultValue(int v);
|
966
|
-
XML_DEPRECATED
|
1123
|
+
XML_DEPRECATED
|
1124
|
+
XMLPUBFUN int
|
967
1125
|
xmlLineNumbersDefault (int val);
|
968
|
-
XML_DEPRECATED
|
1126
|
+
XML_DEPRECATED
|
1127
|
+
XMLPUBFUN int
|
969
1128
|
xmlThrDefLineNumbersDefaultValue(int v);
|
970
|
-
XML_DEPRECATED
|
1129
|
+
XML_DEPRECATED
|
1130
|
+
XMLPUBFUN int
|
971
1131
|
xmlThrDefDoValidityCheckingDefaultValue(int v);
|
972
|
-
XML_DEPRECATED
|
1132
|
+
XML_DEPRECATED
|
1133
|
+
XMLPUBFUN int
|
973
1134
|
xmlThrDefGetWarningsDefaultValue(int v);
|
974
|
-
XML_DEPRECATED
|
1135
|
+
XML_DEPRECATED
|
1136
|
+
XMLPUBFUN int
|
975
1137
|
xmlThrDefLoadExtDtdDefaultValue(int v);
|
976
|
-
XML_DEPRECATED XMLPUBFUN int
|
977
|
-
xmlThrDefParserDebugEntities(int v);
|
978
1138
|
|
979
1139
|
#ifdef LIBXML_SAX1_ENABLED
|
980
1140
|
/*
|
@@ -997,6 +1157,7 @@ XMLPUBFUN xmlDocPtr
|
|
997
1157
|
*/
|
998
1158
|
XMLPUBFUN int
|
999
1159
|
xmlParseDocument (xmlParserCtxtPtr ctxt);
|
1160
|
+
XML_DEPRECATED
|
1000
1161
|
XMLPUBFUN int
|
1001
1162
|
xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
|
1002
1163
|
#ifdef LIBXML_SAX1_ENABLED
|
@@ -1050,6 +1211,18 @@ XMLPUBFUN xmlDocPtr
|
|
1050
1211
|
#endif /* LIBXML_SAX1_ENABLED */
|
1051
1212
|
|
1052
1213
|
#ifdef LIBXML_VALID_ENABLED
|
1214
|
+
XMLPUBFUN xmlDtdPtr
|
1215
|
+
xmlCtxtParseDtd (xmlParserCtxtPtr ctxt,
|
1216
|
+
xmlParserInputPtr input,
|
1217
|
+
const xmlChar *ExternalID,
|
1218
|
+
const xmlChar *SystemID);
|
1219
|
+
XMLPUBFUN int
|
1220
|
+
xmlCtxtValidateDocument (xmlParserCtxtPtr ctxt,
|
1221
|
+
xmlDocPtr doc);
|
1222
|
+
XMLPUBFUN int
|
1223
|
+
xmlCtxtValidateDtd (xmlParserCtxtPtr ctxt,
|
1224
|
+
xmlDocPtr doc,
|
1225
|
+
xmlDtdPtr dtd);
|
1053
1226
|
XML_DEPRECATED
|
1054
1227
|
XMLPUBFUN xmlDtdPtr
|
1055
1228
|
xmlSAXParseDTD (xmlSAXHandlerPtr sax,
|
@@ -1127,26 +1300,6 @@ XMLPUBFUN void
|
|
1127
1300
|
XMLPUBFUN xmlParserCtxtPtr
|
1128
1301
|
xmlCreateDocParserCtxt (const xmlChar *cur);
|
1129
1302
|
|
1130
|
-
#ifdef LIBXML_LEGACY_ENABLED
|
1131
|
-
/*
|
1132
|
-
* Reading/setting optional parsing features.
|
1133
|
-
*/
|
1134
|
-
XML_DEPRECATED
|
1135
|
-
XMLPUBFUN int
|
1136
|
-
xmlGetFeaturesList (int *len,
|
1137
|
-
const char **result);
|
1138
|
-
XML_DEPRECATED
|
1139
|
-
XMLPUBFUN int
|
1140
|
-
xmlGetFeature (xmlParserCtxtPtr ctxt,
|
1141
|
-
const char *name,
|
1142
|
-
void *result);
|
1143
|
-
XML_DEPRECATED
|
1144
|
-
XMLPUBFUN int
|
1145
|
-
xmlSetFeature (xmlParserCtxtPtr ctxt,
|
1146
|
-
const char *name,
|
1147
|
-
void *value);
|
1148
|
-
#endif /* LIBXML_LEGACY_ENABLED */
|
1149
|
-
|
1150
1303
|
#ifdef LIBXML_PUSH_ENABLED
|
1151
1304
|
/*
|
1152
1305
|
* Interfaces for the Push mode.
|
@@ -1184,19 +1337,24 @@ XMLPUBFUN xmlParserInputPtr
|
|
1184
1337
|
/*
|
1185
1338
|
* Node infos.
|
1186
1339
|
*/
|
1340
|
+
XML_DEPRECATED
|
1187
1341
|
XMLPUBFUN const xmlParserNodeInfo*
|
1188
|
-
xmlParserFindNodeInfo (
|
1189
|
-
|
1342
|
+
xmlParserFindNodeInfo (xmlParserCtxtPtr ctxt,
|
1343
|
+
xmlNodePtr node);
|
1344
|
+
XML_DEPRECATED
|
1190
1345
|
XMLPUBFUN void
|
1191
1346
|
xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
|
1347
|
+
XML_DEPRECATED
|
1192
1348
|
XMLPUBFUN void
|
1193
1349
|
xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
|
1350
|
+
XML_DEPRECATED
|
1194
1351
|
XMLPUBFUN unsigned long
|
1195
|
-
xmlParserFindNodeInfoIndex(
|
1196
|
-
|
1352
|
+
xmlParserFindNodeInfoIndex(xmlParserNodeInfoSeqPtr seq,
|
1353
|
+
xmlNodePtr node);
|
1354
|
+
XML_DEPRECATED
|
1197
1355
|
XMLPUBFUN void
|
1198
1356
|
xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
|
1199
|
-
|
1357
|
+
xmlParserNodeInfoPtr info);
|
1200
1358
|
|
1201
1359
|
/*
|
1202
1360
|
* External entities handling actually implemented in xmlIO.
|
@@ -1211,9 +1369,7 @@ XMLPUBFUN xmlParserInputPtr
|
|
1211
1369
|
const char *ID,
|
1212
1370
|
xmlParserCtxtPtr ctxt);
|
1213
1371
|
|
1214
|
-
|
1215
|
-
* Index lookup, actually implemented in the encoding module
|
1216
|
-
*/
|
1372
|
+
XML_DEPRECATED
|
1217
1373
|
XMLPUBFUN long
|
1218
1374
|
xmlByteConsumed (xmlParserCtxtPtr ctxt);
|
1219
1375
|
|
@@ -1251,7 +1407,13 @@ typedef enum {
|
|
1251
1407
|
XML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */
|
1252
1408
|
XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */
|
1253
1409
|
XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */
|
1254
|
-
XML_PARSE_BIG_LINES = 1<<22
|
1410
|
+
XML_PARSE_BIG_LINES = 1<<22,/* Store big lines numbers in text PSVI field */
|
1411
|
+
/* since 2.13.0 */
|
1412
|
+
XML_PARSE_NO_XXE = 1<<23,/* disable loading of external content */
|
1413
|
+
/* since 2.14.0 */
|
1414
|
+
XML_PARSE_UNZIP = 1<<24,/* allow compressed content */
|
1415
|
+
XML_PARSE_NO_SYS_CATALOG = 1<<25,/* disable global system catalog */
|
1416
|
+
XML_PARSE_CATALOG_PI = 1<<26 /* allow catalog PIs */
|
1255
1417
|
} xmlParserOption;
|
1256
1418
|
|
1257
1419
|
XMLPUBFUN void
|
@@ -1262,9 +1424,64 @@ XMLPUBFUN int
|
|
1262
1424
|
int size,
|
1263
1425
|
const char *filename,
|
1264
1426
|
const char *encoding);
|
1427
|
+
XMLPUBFUN int
|
1428
|
+
xmlCtxtGetOptions (xmlParserCtxtPtr ctxt);
|
1429
|
+
XMLPUBFUN int
|
1430
|
+
xmlCtxtSetOptions (xmlParserCtxtPtr ctxt,
|
1431
|
+
int options);
|
1265
1432
|
XMLPUBFUN int
|
1266
1433
|
xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
|
1267
1434
|
int options);
|
1435
|
+
XMLPUBFUN void *
|
1436
|
+
xmlCtxtGetPrivate (xmlParserCtxtPtr ctxt);
|
1437
|
+
XMLPUBFUN void
|
1438
|
+
xmlCtxtSetPrivate (xmlParserCtxtPtr ctxt,
|
1439
|
+
void *priv);
|
1440
|
+
XMLPUBFUN void *
|
1441
|
+
xmlCtxtGetCatalogs (xmlParserCtxtPtr ctxt);
|
1442
|
+
XMLPUBFUN void
|
1443
|
+
xmlCtxtSetCatalogs (xmlParserCtxtPtr ctxt,
|
1444
|
+
void *catalogs);
|
1445
|
+
XMLPUBFUN xmlDictPtr
|
1446
|
+
xmlCtxtGetDict (xmlParserCtxtPtr ctxt);
|
1447
|
+
XMLPUBFUN void
|
1448
|
+
xmlCtxtSetDict (xmlParserCtxtPtr ctxt,
|
1449
|
+
xmlDictPtr);
|
1450
|
+
XMLPUBFUN xmlSAXHandler *
|
1451
|
+
xmlCtxtGetSaxHandler (xmlParserCtxtPtr ctxt);
|
1452
|
+
XMLPUBFUN int
|
1453
|
+
xmlCtxtSetSaxHandler (xmlParserCtxtPtr ctxt,
|
1454
|
+
const xmlSAXHandler *sax);
|
1455
|
+
XMLPUBFUN xmlDocPtr
|
1456
|
+
xmlCtxtGetDocument (xmlParserCtxtPtr ctxt);
|
1457
|
+
XMLPUBFUN int
|
1458
|
+
xmlCtxtIsHtml (xmlParserCtxtPtr ctxt);
|
1459
|
+
XMLPUBFUN int
|
1460
|
+
xmlCtxtIsStopped (xmlParserCtxtPtr ctxt);
|
1461
|
+
#ifdef LIBXML_VALID_ENABLED
|
1462
|
+
XMLPUBFUN xmlValidCtxtPtr
|
1463
|
+
xmlCtxtGetValidCtxt (xmlParserCtxtPtr ctxt);
|
1464
|
+
#endif
|
1465
|
+
XMLPUBFUN const xmlChar *
|
1466
|
+
xmlCtxtGetVersion (xmlParserCtxtPtr ctxt);
|
1467
|
+
XMLPUBFUN const xmlChar *
|
1468
|
+
xmlCtxtGetDeclaredEncoding(xmlParserCtxtPtr ctxt);
|
1469
|
+
XMLPUBFUN int
|
1470
|
+
xmlCtxtGetStandalone (xmlParserCtxtPtr ctxt);
|
1471
|
+
XMLPUBFUN xmlParserStatus
|
1472
|
+
xmlCtxtGetStatus (xmlParserCtxtPtr ctxt);
|
1473
|
+
XMLPUBFUN void
|
1474
|
+
xmlCtxtSetErrorHandler (xmlParserCtxtPtr ctxt,
|
1475
|
+
xmlStructuredErrorFunc handler,
|
1476
|
+
void *data);
|
1477
|
+
XMLPUBFUN void
|
1478
|
+
xmlCtxtSetResourceLoader(xmlParserCtxtPtr ctxt,
|
1479
|
+
xmlResourceLoader loader,
|
1480
|
+
void *vctxt);
|
1481
|
+
XMLPUBFUN void
|
1482
|
+
xmlCtxtSetCharEncConvImpl(xmlParserCtxtPtr ctxt,
|
1483
|
+
xmlCharEncConvImpl impl,
|
1484
|
+
void *vctxt);
|
1268
1485
|
XMLPUBFUN void
|
1269
1486
|
xmlCtxtSetMaxAmplification(xmlParserCtxtPtr ctxt,
|
1270
1487
|
unsigned maxAmpl);
|
@@ -1295,6 +1512,14 @@ XMLPUBFUN xmlDocPtr
|
|
1295
1512
|
const char *URL,
|
1296
1513
|
const char *encoding,
|
1297
1514
|
int options);
|
1515
|
+
XMLPUBFUN xmlDocPtr
|
1516
|
+
xmlCtxtParseDocument (xmlParserCtxtPtr ctxt,
|
1517
|
+
xmlParserInputPtr input);
|
1518
|
+
XMLPUBFUN xmlNodePtr
|
1519
|
+
xmlCtxtParseContent (xmlParserCtxtPtr ctxt,
|
1520
|
+
xmlParserInputPtr input,
|
1521
|
+
xmlNodePtr node,
|
1522
|
+
int hasTextDecl);
|
1298
1523
|
XMLPUBFUN xmlDocPtr
|
1299
1524
|
xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
|
1300
1525
|
const xmlChar *cur,
|
@@ -1328,6 +1553,29 @@ XMLPUBFUN xmlDocPtr
|
|
1328
1553
|
const char *encoding,
|
1329
1554
|
int options);
|
1330
1555
|
|
1556
|
+
/**
|
1557
|
+
* New input API
|
1558
|
+
*/
|
1559
|
+
|
1560
|
+
XMLPUBFUN xmlParserErrors
|
1561
|
+
xmlNewInputFromUrl(const char *url, xmlParserInputFlags flags,
|
1562
|
+
xmlParserInputPtr *out);
|
1563
|
+
XMLPUBFUN xmlParserInputPtr
|
1564
|
+
xmlNewInputFromMemory(const char *url, const void *mem, size_t size,
|
1565
|
+
xmlParserInputFlags flags);
|
1566
|
+
XMLPUBFUN xmlParserInputPtr
|
1567
|
+
xmlNewInputFromString(const char *url, const char *str,
|
1568
|
+
xmlParserInputFlags flags);
|
1569
|
+
XMLPUBFUN xmlParserInputPtr
|
1570
|
+
xmlNewInputFromFd(const char *url, int fd, xmlParserInputFlags flags);
|
1571
|
+
XMLPUBFUN xmlParserInputPtr
|
1572
|
+
xmlNewInputFromIO(const char *url, xmlInputReadCallback ioRead,
|
1573
|
+
xmlInputCloseCallback ioClose, void *ioCtxt,
|
1574
|
+
xmlParserInputFlags flags);
|
1575
|
+
XMLPUBFUN xmlParserErrors
|
1576
|
+
xmlInputSetEncodingHandler(xmlParserInputPtr input,
|
1577
|
+
xmlCharEncodingHandlerPtr handler);
|
1578
|
+
|
1331
1579
|
/*
|
1332
1580
|
* Library wide options
|
1333
1581
|
*/
|
@@ -1368,10 +1616,11 @@ typedef enum {
|
|
1368
1616
|
XML_WITH_MODULES = 27,
|
1369
1617
|
XML_WITH_DEBUG = 28,
|
1370
1618
|
XML_WITH_DEBUG_MEM = 29,
|
1371
|
-
XML_WITH_DEBUG_RUN = 30,
|
1619
|
+
XML_WITH_DEBUG_RUN = 30, /* unused */
|
1372
1620
|
XML_WITH_ZLIB = 31,
|
1373
1621
|
XML_WITH_ICU = 32,
|
1374
1622
|
XML_WITH_LZMA = 33,
|
1623
|
+
XML_WITH_RELAXNG = 34, /* since 2.14.0 */
|
1375
1624
|
XML_WITH_NONE = 99999 /* just to be sure of allocation size */
|
1376
1625
|
} xmlFeature;
|
1377
1626
|
|