lxml 5.3.2__cp312-cp312-macosx_10_9_universal2.whl → 5.4.0__cp312-cp312-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-312-darwin.so +0 -0
- lxml/builder.cpython-312-darwin.so +0 -0
- lxml/etree.cpython-312-darwin.so +0 -0
- lxml/html/diff.cpython-312-darwin.so +0 -0
- lxml/includes/libexslt/exsltconfig.h +3 -3
- lxml/includes/libxml/HTMLparser.h +12 -19
- lxml/includes/libxml/c14n.h +1 -12
- lxml/includes/libxml/debugXML.h +1 -1
- lxml/includes/libxml/encoding.h +9 -0
- lxml/includes/libxml/entities.h +12 -1
- lxml/includes/libxml/hash.h +19 -0
- lxml/includes/libxml/list.h +2 -2
- lxml/includes/libxml/nanohttp.h +17 -0
- lxml/includes/libxml/parser.h +60 -54
- lxml/includes/libxml/parserInternals.h +9 -1
- lxml/includes/libxml/tree.h +32 -12
- lxml/includes/libxml/uri.h +11 -0
- lxml/includes/libxml/valid.h +29 -2
- lxml/includes/libxml/xinclude.h +7 -0
- lxml/includes/libxml/xmlIO.h +21 -4
- lxml/includes/libxml/xmlerror.h +14 -0
- lxml/includes/libxml/xmlexports.h +111 -15
- lxml/includes/libxml/xmlmemory.h +8 -45
- lxml/includes/libxml/xmlreader.h +2 -0
- lxml/includes/libxml/xmlsave.h +5 -0
- lxml/includes/libxml/xmlunicode.h +165 -1
- lxml/includes/libxml/xmlversion.h +7 -171
- lxml/includes/libxml/xmlwriter.h +1 -0
- lxml/includes/libxml/xpath.h +4 -0
- lxml/includes/libxslt/xsltconfig.h +6 -6
- lxml/includes/lxml-version.h +1 -1
- lxml/objectify.cpython-312-darwin.so +0 -0
- lxml/sax.cpython-312-darwin.so +0 -0
- {lxml-5.3.2.dist-info → lxml-5.4.0.dist-info}/METADATA +7 -11
- {lxml-5.3.2.dist-info → lxml-5.4.0.dist-info}/RECORD +40 -40
- {lxml-5.3.2.dist-info → lxml-5.4.0.dist-info}/WHEEL +1 -1
- {lxml-5.3.2.dist-info → lxml-5.4.0.dist-info}/licenses/LICENSE.txt +0 -0
- {lxml-5.3.2.dist-info → lxml-5.4.0.dist-info}/licenses/LICENSES.txt +0 -0
- {lxml-5.3.2.dist-info → lxml-5.4.0.dist-info}/top_level.txt +0 -0
lxml/__init__.py
CHANGED
Binary file
|
Binary file
|
lxml/etree.cpython-312-darwin.so
CHANGED
Binary file
|
Binary file
|
@@ -18,21 +18,21 @@ extern "C" {
|
|
18
18
|
*
|
19
19
|
* the version string like "1.2.3"
|
20
20
|
*/
|
21
|
-
#define LIBEXSLT_DOTTED_VERSION "0.8.
|
21
|
+
#define LIBEXSLT_DOTTED_VERSION "0.8.24"
|
22
22
|
|
23
23
|
/**
|
24
24
|
* LIBEXSLT_VERSION:
|
25
25
|
*
|
26
26
|
* the version number: 1.2.3 value is 10203
|
27
27
|
*/
|
28
|
-
#define LIBEXSLT_VERSION
|
28
|
+
#define LIBEXSLT_VERSION 824
|
29
29
|
|
30
30
|
/**
|
31
31
|
* LIBEXSLT_VERSION_STRING:
|
32
32
|
*
|
33
33
|
* the version number string, 1.2.3 value is "10203"
|
34
34
|
*/
|
35
|
-
#define LIBEXSLT_VERSION_STRING "
|
35
|
+
#define LIBEXSLT_VERSION_STRING "824"
|
36
36
|
|
37
37
|
/**
|
38
38
|
* LIBEXSLT_VERSION_EXTRA:
|
@@ -80,22 +80,17 @@ struct _htmlEntityDesc {
|
|
80
80
|
const char *desc; /* the description */
|
81
81
|
};
|
82
82
|
|
83
|
-
/** DOC_DISABLE */
|
84
83
|
#ifdef LIBXML_SAX1_ENABLED
|
85
|
-
#define XML_GLOBALS_HTML \
|
86
|
-
XML_OP(htmlDefaultSAXHandler, xmlSAXHandlerV1, XML_DEPRECATED)
|
87
|
-
#else
|
88
|
-
#define XML_GLOBALS_HTML
|
89
|
-
#endif
|
90
84
|
|
91
|
-
|
92
|
-
|
93
|
-
#undef XML_OP
|
85
|
+
XML_DEPRECATED
|
86
|
+
XMLPUBVAR const xmlSAXHandlerV1 htmlDefaultSAXHandler;
|
94
87
|
|
95
|
-
#
|
96
|
-
|
88
|
+
#ifdef LIBXML_THREAD_ENABLED
|
89
|
+
XML_DEPRECATED
|
90
|
+
XMLPUBFUN const xmlSAXHandlerV1 *__htmlDefaultSAXHandler(void);
|
97
91
|
#endif
|
98
|
-
|
92
|
+
|
93
|
+
#endif /* LIBXML_SAX1_ENABLED */
|
99
94
|
|
100
95
|
/*
|
101
96
|
* There is only few public functions.
|
@@ -173,6 +168,7 @@ XMLPUBFUN int
|
|
173
168
|
int *inlen, int quoteChar);
|
174
169
|
XMLPUBFUN int
|
175
170
|
htmlIsScriptAttribute(const xmlChar *name);
|
171
|
+
XML_DEPRECATED
|
176
172
|
XMLPUBFUN int
|
177
173
|
htmlHandleOmittedElem(int val);
|
178
174
|
|
@@ -251,6 +247,9 @@ XMLPUBFUN htmlDocPtr
|
|
251
247
|
const char *URL,
|
252
248
|
const char *encoding,
|
253
249
|
int options);
|
250
|
+
XMLPUBFUN htmlDocPtr
|
251
|
+
htmlCtxtParseDocument (htmlParserCtxtPtr ctxt,
|
252
|
+
xmlParserInputPtr input);
|
254
253
|
XMLPUBFUN htmlDocPtr
|
255
254
|
htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
|
256
255
|
const xmlChar *cur,
|
@@ -300,7 +299,7 @@ typedef enum {
|
|
300
299
|
XMLPUBFUN htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
|
301
300
|
XMLPUBFUN int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
|
302
301
|
XMLPUBFUN htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
|
303
|
-
XMLPUBFUN htmlStatus htmlNodeStatus(
|
302
|
+
XMLPUBFUN htmlStatus htmlNodeStatus(htmlNodePtr, int) ;
|
304
303
|
/**
|
305
304
|
* htmlDefaultSubelement:
|
306
305
|
* @elt: HTML element
|
@@ -333,11 +332,5 @@ XMLPUBFUN htmlStatus htmlNodeStatus(const htmlNodePtr, int) ;
|
|
333
332
|
}
|
334
333
|
#endif
|
335
334
|
|
336
|
-
#else /* LIBXML_HTML_ENABLED */
|
337
|
-
|
338
|
-
/** DOC_DISABLE */
|
339
|
-
#define XML_GLOBALS_HTML
|
340
|
-
/** DOC_ENABLE */
|
341
|
-
|
342
335
|
#endif /* LIBXML_HTML_ENABLED */
|
343
336
|
#endif /* __HTML_PARSER_H__ */
|
lxml/includes/libxml/c14n.h
CHANGED
@@ -39,18 +39,7 @@ extern "C" {
|
|
39
39
|
* a) default attributes (if any) are added to all nodes
|
40
40
|
* b) all character and parsed entity references are resolved
|
41
41
|
* In order to achieve this in libxml2 the document MUST be loaded with
|
42
|
-
* following
|
43
|
-
*
|
44
|
-
* xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
|
45
|
-
* xmlSubstituteEntitiesDefault(1);
|
46
|
-
*
|
47
|
-
* or corresponding parser context setting:
|
48
|
-
* xmlParserCtxtPtr ctxt;
|
49
|
-
*
|
50
|
-
* ...
|
51
|
-
* ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
|
52
|
-
* ctxt->replaceEntities = 1;
|
53
|
-
* ...
|
42
|
+
* following options: XML_PARSE_DTDATTR | XML_PARSE_NOENT
|
54
43
|
*/
|
55
44
|
|
56
45
|
/*
|
lxml/includes/libxml/debugXML.h
CHANGED
lxml/includes/libxml/encoding.h
CHANGED
@@ -162,6 +162,13 @@ XMLPUBFUN void
|
|
162
162
|
xmlCleanupCharEncodingHandlers (void);
|
163
163
|
XMLPUBFUN void
|
164
164
|
xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
|
165
|
+
XMLPUBFUN int
|
166
|
+
xmlLookupCharEncodingHandler (xmlCharEncoding enc,
|
167
|
+
xmlCharEncodingHandlerPtr *out);
|
168
|
+
XMLPUBFUN int
|
169
|
+
xmlOpenCharEncodingHandler (const char *name,
|
170
|
+
int output,
|
171
|
+
xmlCharEncodingHandlerPtr *out);
|
165
172
|
XMLPUBFUN xmlCharEncodingHandlerPtr
|
166
173
|
xmlGetCharEncodingHandler (xmlCharEncoding enc);
|
167
174
|
XMLPUBFUN xmlCharEncodingHandlerPtr
|
@@ -195,7 +202,9 @@ XMLPUBFUN xmlCharEncoding
|
|
195
202
|
xmlDetectCharEncoding (const unsigned char *in,
|
196
203
|
int len);
|
197
204
|
|
205
|
+
/** DOC_DISABLE */
|
198
206
|
struct _xmlBuffer;
|
207
|
+
/** DOC_ENABLE */
|
199
208
|
XMLPUBFUN int
|
200
209
|
xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
|
201
210
|
struct _xmlBuffer *out,
|
lxml/includes/libxml/entities.h
CHANGED
@@ -11,10 +11,12 @@
|
|
11
11
|
#ifndef __XML_ENTITIES_H__
|
12
12
|
#define __XML_ENTITIES_H__
|
13
13
|
|
14
|
+
/** DOC_DISABLE */
|
14
15
|
#include <libxml/xmlversion.h>
|
15
16
|
#define XML_TREE_INTERNALS
|
16
17
|
#include <libxml/tree.h>
|
17
18
|
#undef XML_TREE_INTERNALS
|
19
|
+
/** DOC_ENABLE */
|
18
20
|
|
19
21
|
#ifdef __cplusplus
|
20
22
|
extern "C" {
|
@@ -57,7 +59,7 @@ struct _xmlEntity {
|
|
57
59
|
|
58
60
|
struct _xmlEntity *nexte; /* unused */
|
59
61
|
const xmlChar *URI; /* the full URI as computed */
|
60
|
-
int owner; /*
|
62
|
+
int owner; /* unused */
|
61
63
|
int flags; /* various flags */
|
62
64
|
unsigned long expandedSize; /* expanded size */
|
63
65
|
};
|
@@ -89,6 +91,15 @@ XMLPUBFUN xmlEntityPtr
|
|
89
91
|
const xmlChar *content);
|
90
92
|
XMLPUBFUN void
|
91
93
|
xmlFreeEntity (xmlEntityPtr entity);
|
94
|
+
XMLPUBFUN int
|
95
|
+
xmlAddEntity (xmlDocPtr doc,
|
96
|
+
int extSubset,
|
97
|
+
const xmlChar *name,
|
98
|
+
int type,
|
99
|
+
const xmlChar *ExternalID,
|
100
|
+
const xmlChar *SystemID,
|
101
|
+
const xmlChar *content,
|
102
|
+
xmlEntityPtr *out);
|
92
103
|
XMLPUBFUN xmlEntityPtr
|
93
104
|
xmlAddDocEntity (xmlDocPtr doc,
|
94
105
|
const xmlChar *name,
|
lxml/includes/libxml/hash.h
CHANGED
@@ -109,6 +109,10 @@ XMLPUBFUN void
|
|
109
109
|
/*
|
110
110
|
* Add a new entry to the hash table.
|
111
111
|
*/
|
112
|
+
XMLPUBFUN int
|
113
|
+
xmlHashAdd (xmlHashTablePtr hash,
|
114
|
+
const xmlChar *name,
|
115
|
+
void *userdata);
|
112
116
|
XMLPUBFUN int
|
113
117
|
xmlHashAddEntry (xmlHashTablePtr hash,
|
114
118
|
const xmlChar *name,
|
@@ -118,6 +122,11 @@ XMLPUBFUN int
|
|
118
122
|
const xmlChar *name,
|
119
123
|
void *userdata,
|
120
124
|
xmlHashDeallocator dealloc);
|
125
|
+
XMLPUBFUN int
|
126
|
+
xmlHashAdd2 (xmlHashTablePtr hash,
|
127
|
+
const xmlChar *name,
|
128
|
+
const xmlChar *name2,
|
129
|
+
void *userdata);
|
121
130
|
XMLPUBFUN int
|
122
131
|
xmlHashAddEntry2 (xmlHashTablePtr hash,
|
123
132
|
const xmlChar *name,
|
@@ -129,6 +138,12 @@ XMLPUBFUN int
|
|
129
138
|
const xmlChar *name2,
|
130
139
|
void *userdata,
|
131
140
|
xmlHashDeallocator dealloc);
|
141
|
+
XMLPUBFUN int
|
142
|
+
xmlHashAdd3 (xmlHashTablePtr hash,
|
143
|
+
const xmlChar *name,
|
144
|
+
const xmlChar *name2,
|
145
|
+
const xmlChar *name3,
|
146
|
+
void *userdata);
|
132
147
|
XMLPUBFUN int
|
133
148
|
xmlHashAddEntry3 (xmlHashTablePtr hash,
|
134
149
|
const xmlChar *name,
|
@@ -199,6 +214,10 @@ XMLPUBFUN void *
|
|
199
214
|
/*
|
200
215
|
* Helpers.
|
201
216
|
*/
|
217
|
+
XMLPUBFUN xmlHashTablePtr
|
218
|
+
xmlHashCopySafe (xmlHashTablePtr hash,
|
219
|
+
xmlHashCopier copy,
|
220
|
+
xmlHashDeallocator dealloc);
|
202
221
|
XMLPUBFUN xmlHashTablePtr
|
203
222
|
xmlHashCopy (xmlHashTablePtr hash,
|
204
223
|
xmlHashCopier copy);
|
lxml/includes/libxml/list.h
CHANGED
@@ -119,10 +119,10 @@ XMLPUBFUN void
|
|
119
119
|
xmlListMerge (xmlListPtr l1,
|
120
120
|
xmlListPtr l2);
|
121
121
|
XMLPUBFUN xmlListPtr
|
122
|
-
xmlListDup (
|
122
|
+
xmlListDup (xmlListPtr old);
|
123
123
|
XMLPUBFUN int
|
124
124
|
xmlListCopy (xmlListPtr cur,
|
125
|
-
|
125
|
+
xmlListPtr old);
|
126
126
|
/* Link operators */
|
127
127
|
XMLPUBFUN void *
|
128
128
|
xmlLinkGetData (xmlLinkPtr lk);
|
lxml/includes/libxml/nanohttp.h
CHANGED
@@ -18,16 +18,21 @@
|
|
18
18
|
#ifdef __cplusplus
|
19
19
|
extern "C" {
|
20
20
|
#endif
|
21
|
+
XML_DEPRECATED
|
21
22
|
XMLPUBFUN void
|
22
23
|
xmlNanoHTTPInit (void);
|
24
|
+
XML_DEPRECATED
|
23
25
|
XMLPUBFUN void
|
24
26
|
xmlNanoHTTPCleanup (void);
|
27
|
+
XML_DEPRECATED
|
25
28
|
XMLPUBFUN void
|
26
29
|
xmlNanoHTTPScanProxy (const char *URL);
|
30
|
+
XML_DEPRECATED
|
27
31
|
XMLPUBFUN int
|
28
32
|
xmlNanoHTTPFetch (const char *URL,
|
29
33
|
const char *filename,
|
30
34
|
char **contentType);
|
35
|
+
XML_DEPRECATED
|
31
36
|
XMLPUBFUN void *
|
32
37
|
xmlNanoHTTPMethod (const char *URL,
|
33
38
|
const char *method,
|
@@ -35,6 +40,7 @@ XMLPUBFUN void *
|
|
35
40
|
char **contentType,
|
36
41
|
const char *headers,
|
37
42
|
int ilen);
|
43
|
+
XML_DEPRECATED
|
38
44
|
XMLPUBFUN void *
|
39
45
|
xmlNanoHTTPMethodRedir (const char *URL,
|
40
46
|
const char *method,
|
@@ -43,34 +49,45 @@ XMLPUBFUN void *
|
|
43
49
|
char **redir,
|
44
50
|
const char *headers,
|
45
51
|
int ilen);
|
52
|
+
XML_DEPRECATED
|
46
53
|
XMLPUBFUN void *
|
47
54
|
xmlNanoHTTPOpen (const char *URL,
|
48
55
|
char **contentType);
|
56
|
+
XML_DEPRECATED
|
49
57
|
XMLPUBFUN void *
|
50
58
|
xmlNanoHTTPOpenRedir (const char *URL,
|
51
59
|
char **contentType,
|
52
60
|
char **redir);
|
61
|
+
XML_DEPRECATED
|
53
62
|
XMLPUBFUN int
|
54
63
|
xmlNanoHTTPReturnCode (void *ctx);
|
64
|
+
XML_DEPRECATED
|
55
65
|
XMLPUBFUN const char *
|
56
66
|
xmlNanoHTTPAuthHeader (void *ctx);
|
67
|
+
XML_DEPRECATED
|
57
68
|
XMLPUBFUN const char *
|
58
69
|
xmlNanoHTTPRedir (void *ctx);
|
70
|
+
XML_DEPRECATED
|
59
71
|
XMLPUBFUN int
|
60
72
|
xmlNanoHTTPContentLength( void * ctx );
|
73
|
+
XML_DEPRECATED
|
61
74
|
XMLPUBFUN const char *
|
62
75
|
xmlNanoHTTPEncoding (void *ctx);
|
76
|
+
XML_DEPRECATED
|
63
77
|
XMLPUBFUN const char *
|
64
78
|
xmlNanoHTTPMimeType (void *ctx);
|
79
|
+
XML_DEPRECATED
|
65
80
|
XMLPUBFUN int
|
66
81
|
xmlNanoHTTPRead (void *ctx,
|
67
82
|
void *dest,
|
68
83
|
int len);
|
69
84
|
#ifdef LIBXML_OUTPUT_ENABLED
|
85
|
+
XML_DEPRECATED
|
70
86
|
XMLPUBFUN int
|
71
87
|
xmlNanoHTTPSave (void *ctxt,
|
72
88
|
const char *filename);
|
73
89
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
90
|
+
XML_DEPRECATED
|
74
91
|
XMLPUBFUN void
|
75
92
|
xmlNanoHTTPClose (void *ctx);
|
76
93
|
#ifdef __cplusplus
|
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" {
|
@@ -62,11 +64,11 @@ struct _xmlParserInput {
|
|
62
64
|
xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */
|
63
65
|
|
64
66
|
const char *filename; /* The file analyzed, if any */
|
65
|
-
const char *directory; /*
|
67
|
+
const char *directory; /* unused */
|
66
68
|
const xmlChar *base; /* Base of the array to parse */
|
67
69
|
const xmlChar *cur; /* Current char being parsed */
|
68
70
|
const xmlChar *end; /* end of the array to parse */
|
69
|
-
int length; /*
|
71
|
+
int length; /* unused */
|
70
72
|
int line; /* Current line */
|
71
73
|
int col; /* Current column */
|
72
74
|
unsigned long consumed; /* How many xmlChars already consumed */
|
@@ -75,7 +77,7 @@ struct _xmlParserInput {
|
|
75
77
|
const xmlChar *version; /* the version string for entity */
|
76
78
|
int flags; /* Flags */
|
77
79
|
int id; /* an unique identifier for the entity */
|
78
|
-
unsigned long parentConsumed; /*
|
80
|
+
unsigned long parentConsumed; /* unused */
|
79
81
|
xmlEntityPtr entity; /* entity, if any */
|
80
82
|
};
|
81
83
|
|
@@ -134,30 +136,14 @@ typedef enum {
|
|
134
136
|
XML_PARSER_XML_DECL /* before XML decl (but after BOM) */
|
135
137
|
} xmlParserInputState;
|
136
138
|
|
137
|
-
/**
|
138
|
-
|
139
|
-
*
|
140
|
-
* Bit in the loadsubset context field to tell to do ID/REFs lookups.
|
141
|
-
* Use it to initialize xmlLoadExtDtdDefaultValue.
|
139
|
+
/** DOC_DISABLE */
|
140
|
+
/*
|
141
|
+
* Internal bits in the 'loadsubset' context member
|
142
142
|
*/
|
143
143
|
#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
144
|
#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
145
|
#define XML_SKIP_IDS 8
|
146
|
+
/** DOC_ENABLE */
|
161
147
|
|
162
148
|
/**
|
163
149
|
* xmlParserMode:
|
@@ -222,16 +208,16 @@ struct _xmlParserCtxt {
|
|
222
208
|
|
223
209
|
int hasExternalSubset; /* reference and external subset */
|
224
210
|
int hasPErefs; /* the internal subset has PE refs */
|
225
|
-
int external; /*
|
211
|
+
int external; /* unused */
|
226
212
|
|
227
213
|
int valid; /* is the document valid */
|
228
214
|
int validate; /* shall we try to validate ? */
|
229
215
|
xmlValidCtxt vctxt; /* The validity context */
|
230
216
|
|
231
|
-
xmlParserInputState instate; /*
|
232
|
-
int token; /*
|
217
|
+
xmlParserInputState instate; /* push parser state */
|
218
|
+
int token; /* unused */
|
233
219
|
|
234
|
-
char *directory; /*
|
220
|
+
char *directory; /* unused */
|
235
221
|
|
236
222
|
/* Node name stack */
|
237
223
|
const xmlChar *name; /* Current parsed Node */
|
@@ -255,7 +241,7 @@ struct _xmlParserCtxt {
|
|
255
241
|
int * spaceTab; /* array of space infos */
|
256
242
|
|
257
243
|
int depth; /* to prevent entity substitution loops */
|
258
|
-
xmlParserInputPtr entity; /*
|
244
|
+
xmlParserInputPtr entity; /* unused */
|
259
245
|
int charset; /* unused */
|
260
246
|
int nodelen; /* Those two fields are there to */
|
261
247
|
int nodemem; /* Speed up large node parsing */
|
@@ -266,11 +252,11 @@ struct _xmlParserCtxt {
|
|
266
252
|
int linenumbers; /* set line number in element content */
|
267
253
|
void *catalogs; /* document's own catalog */
|
268
254
|
int recovery; /* run in recovery mode */
|
269
|
-
int progressive; /*
|
255
|
+
int progressive; /* unused */
|
270
256
|
xmlDictPtr dict; /* dictionary for the parser */
|
271
257
|
const xmlChar * *atts; /* array for the attributes callbacks */
|
272
258
|
int maxatts; /* the size of the array */
|
273
|
-
int docdict; /*
|
259
|
+
int docdict; /* unused */
|
274
260
|
|
275
261
|
/*
|
276
262
|
* pre-interned strings
|
@@ -308,7 +294,7 @@ struct _xmlParserCtxt {
|
|
308
294
|
xmlError lastError;
|
309
295
|
xmlParserMode parseMode; /* the parser mode */
|
310
296
|
unsigned long nbentities; /* unused */
|
311
|
-
unsigned long sizeentities; /* size of
|
297
|
+
unsigned long sizeentities; /* size of external entities */
|
312
298
|
|
313
299
|
/* for use by HTML non-recursive parser */
|
314
300
|
xmlParserNodeInfo *nodeInfo; /* Current NodeInfo */
|
@@ -327,6 +313,9 @@ struct _xmlParserCtxt {
|
|
327
313
|
xmlParserNsData *nsdb; /* namespace database */
|
328
314
|
unsigned attrHashMax; /* allocated size */
|
329
315
|
xmlAttrHashBucket *attrHash; /* atttribute hash table */
|
316
|
+
|
317
|
+
xmlStructuredErrorFunc errorHandler;
|
318
|
+
void *errorCtxt;
|
330
319
|
};
|
331
320
|
|
332
321
|
/**
|
@@ -843,21 +832,39 @@ typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
|
|
843
832
|
*/
|
844
833
|
|
845
834
|
XMLPUBVAR const char *const xmlParserVersion;
|
835
|
+
XML_DEPRECATED
|
836
|
+
XMLPUBVAR const int oldXMLWDcompatibility;
|
837
|
+
XML_DEPRECATED
|
838
|
+
XMLPUBVAR const int xmlParserDebugEntities;
|
839
|
+
XML_DEPRECATED
|
840
|
+
XMLPUBVAR const xmlSAXLocator xmlDefaultSAXLocator;
|
841
|
+
#ifdef LIBXML_SAX1_ENABLED
|
842
|
+
XML_DEPRECATED
|
843
|
+
XMLPUBVAR const xmlSAXHandlerV1 xmlDefaultSAXHandler;
|
844
|
+
#endif
|
845
|
+
|
846
846
|
#ifdef LIBXML_THREAD_ENABLED
|
847
847
|
/* backward compatibility */
|
848
848
|
XMLPUBFUN const char *const *__xmlParserVersion(void);
|
849
|
+
XML_DEPRECATED
|
850
|
+
XMLPUBFUN const int *__oldXMLWDcompatibility(void);
|
851
|
+
XML_DEPRECATED
|
852
|
+
XMLPUBFUN const int *__xmlParserDebugEntities(void);
|
853
|
+
XML_DEPRECATED
|
854
|
+
XMLPUBFUN const xmlSAXLocator *__xmlDefaultSAXLocator(void);
|
855
|
+
#ifdef LIBXML_SAX1_ENABLED
|
856
|
+
XML_DEPRECATED
|
857
|
+
XMLPUBFUN const xmlSAXHandlerV1 *__xmlDefaultSAXHandler(void);
|
858
|
+
#endif
|
849
859
|
#endif
|
850
860
|
|
851
861
|
/** DOC_DISABLE */
|
852
862
|
#define XML_GLOBALS_PARSER_CORE \
|
853
|
-
XML_OP(oldXMLWDcompatibility, int, XML_DEPRECATED) \
|
854
|
-
XML_OP(xmlDefaultSAXLocator, xmlSAXLocator, XML_DEPRECATED) \
|
855
863
|
XML_OP(xmlDoValidityCheckingDefaultValue, int, XML_DEPRECATED) \
|
856
864
|
XML_OP(xmlGetWarningsDefaultValue, int, XML_DEPRECATED) \
|
857
865
|
XML_OP(xmlKeepBlanksDefaultValue, int, XML_DEPRECATED) \
|
858
866
|
XML_OP(xmlLineNumbersDefaultValue, int, XML_DEPRECATED) \
|
859
867
|
XML_OP(xmlLoadExtDtdDefaultValue, int, XML_DEPRECATED) \
|
860
|
-
XML_OP(xmlParserDebugEntities, int, XML_DEPRECATED) \
|
861
868
|
XML_OP(xmlPedanticParserDefaultValue, int, XML_DEPRECATED) \
|
862
869
|
XML_OP(xmlSubstituteEntitiesDefaultValue, int, XML_DEPRECATED)
|
863
870
|
|
@@ -870,26 +877,15 @@ XMLPUBFUN const char *const *__xmlParserVersion(void);
|
|
870
877
|
#define XML_GLOBALS_PARSER_OUTPUT
|
871
878
|
#endif
|
872
879
|
|
873
|
-
#ifdef LIBXML_SAX1_ENABLED
|
874
|
-
#define XML_GLOBALS_PARSER_SAX1 \
|
875
|
-
XML_OP(xmlDefaultSAXHandler, xmlSAXHandlerV1, XML_DEPRECATED)
|
876
|
-
#else
|
877
|
-
#define XML_GLOBALS_PARSER_SAX1
|
878
|
-
#endif
|
879
|
-
|
880
880
|
#define XML_GLOBALS_PARSER \
|
881
881
|
XML_GLOBALS_PARSER_CORE \
|
882
|
-
XML_GLOBALS_PARSER_OUTPUT
|
883
|
-
XML_GLOBALS_PARSER_SAX1
|
882
|
+
XML_GLOBALS_PARSER_OUTPUT
|
884
883
|
|
885
884
|
#define XML_OP XML_DECLARE_GLOBAL
|
886
885
|
XML_GLOBALS_PARSER
|
887
886
|
#undef XML_OP
|
888
887
|
|
889
888
|
#if defined(LIBXML_THREAD_ENABLED) && !defined(XML_GLOBALS_NO_REDEFINITION)
|
890
|
-
#define oldXMLWDcompatibility XML_GLOBAL_MACRO(oldXMLWDcompatibility)
|
891
|
-
#define xmlDefaultSAXHandler XML_GLOBAL_MACRO(xmlDefaultSAXHandler)
|
892
|
-
#define xmlDefaultSAXLocator XML_GLOBAL_MACRO(xmlDefaultSAXLocator)
|
893
889
|
#define xmlDoValidityCheckingDefaultValue \
|
894
890
|
XML_GLOBAL_MACRO(xmlDoValidityCheckingDefaultValue)
|
895
891
|
#define xmlGetWarningsDefaultValue \
|
@@ -898,7 +894,6 @@ XML_GLOBALS_PARSER
|
|
898
894
|
#define xmlLineNumbersDefaultValue \
|
899
895
|
XML_GLOBAL_MACRO(xmlLineNumbersDefaultValue)
|
900
896
|
#define xmlLoadExtDtdDefaultValue XML_GLOBAL_MACRO(xmlLoadExtDtdDefaultValue)
|
901
|
-
#define xmlParserDebugEntities XML_GLOBAL_MACRO(xmlParserDebugEntities)
|
902
897
|
#define xmlPedanticParserDefaultValue \
|
903
898
|
XML_GLOBAL_MACRO(xmlPedanticParserDefaultValue)
|
904
899
|
#define xmlSubstituteEntitiesDefaultValue \
|
@@ -1185,18 +1180,18 @@ XMLPUBFUN xmlParserInputPtr
|
|
1185
1180
|
* Node infos.
|
1186
1181
|
*/
|
1187
1182
|
XMLPUBFUN const xmlParserNodeInfo*
|
1188
|
-
xmlParserFindNodeInfo (
|
1189
|
-
|
1183
|
+
xmlParserFindNodeInfo (xmlParserCtxtPtr ctxt,
|
1184
|
+
xmlNodePtr node);
|
1190
1185
|
XMLPUBFUN void
|
1191
1186
|
xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
|
1192
1187
|
XMLPUBFUN void
|
1193
1188
|
xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
|
1194
1189
|
XMLPUBFUN unsigned long
|
1195
|
-
xmlParserFindNodeInfoIndex(
|
1196
|
-
|
1190
|
+
xmlParserFindNodeInfoIndex(xmlParserNodeInfoSeqPtr seq,
|
1191
|
+
xmlNodePtr node);
|
1197
1192
|
XMLPUBFUN void
|
1198
1193
|
xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
|
1199
|
-
|
1194
|
+
xmlParserNodeInfoPtr info);
|
1200
1195
|
|
1201
1196
|
/*
|
1202
1197
|
* External entities handling actually implemented in xmlIO.
|
@@ -1251,7 +1246,8 @@ typedef enum {
|
|
1251
1246
|
XML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */
|
1252
1247
|
XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */
|
1253
1248
|
XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */
|
1254
|
-
XML_PARSE_BIG_LINES = 1<<22
|
1249
|
+
XML_PARSE_BIG_LINES = 1<<22,/* Store big lines numbers in text PSVI field */
|
1250
|
+
XML_PARSE_NO_XXE = 1<<23 /* disable loading of external content */
|
1255
1251
|
} xmlParserOption;
|
1256
1252
|
|
1257
1253
|
XMLPUBFUN void
|
@@ -1262,9 +1258,16 @@ XMLPUBFUN int
|
|
1262
1258
|
int size,
|
1263
1259
|
const char *filename,
|
1264
1260
|
const char *encoding);
|
1261
|
+
XMLPUBFUN int
|
1262
|
+
xmlCtxtSetOptions (xmlParserCtxtPtr ctxt,
|
1263
|
+
int options);
|
1265
1264
|
XMLPUBFUN int
|
1266
1265
|
xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
|
1267
1266
|
int options);
|
1267
|
+
XMLPUBFUN void
|
1268
|
+
xmlCtxtSetErrorHandler (xmlParserCtxtPtr ctxt,
|
1269
|
+
xmlStructuredErrorFunc handler,
|
1270
|
+
void *data);
|
1268
1271
|
XMLPUBFUN void
|
1269
1272
|
xmlCtxtSetMaxAmplification(xmlParserCtxtPtr ctxt,
|
1270
1273
|
unsigned maxAmpl);
|
@@ -1295,6 +1298,9 @@ XMLPUBFUN xmlDocPtr
|
|
1295
1298
|
const char *URL,
|
1296
1299
|
const char *encoding,
|
1297
1300
|
int options);
|
1301
|
+
XMLPUBFUN xmlDocPtr
|
1302
|
+
xmlCtxtParseDocument (xmlParserCtxtPtr ctxt,
|
1303
|
+
xmlParserInputPtr input);
|
1298
1304
|
XMLPUBFUN xmlDocPtr
|
1299
1305
|
xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
|
1300
1306
|
const xmlChar *cur,
|
@@ -1368,7 +1374,7 @@ typedef enum {
|
|
1368
1374
|
XML_WITH_MODULES = 27,
|
1369
1375
|
XML_WITH_DEBUG = 28,
|
1370
1376
|
XML_WITH_DEBUG_MEM = 29,
|
1371
|
-
XML_WITH_DEBUG_RUN = 30,
|
1377
|
+
XML_WITH_DEBUG_RUN = 30, /* unused */
|
1372
1378
|
XML_WITH_ZLIB = 31,
|
1373
1379
|
XML_WITH_ICU = 32,
|
1374
1380
|
XML_WITH_LZMA = 33,
|
@@ -25,11 +25,14 @@ extern "C" {
|
|
25
25
|
/**
|
26
26
|
* xmlParserMaxDepth:
|
27
27
|
*
|
28
|
+
* DEPRECATED: has no effect
|
29
|
+
*
|
28
30
|
* arbitrary depth limit for the XML documents that we allow to
|
29
31
|
* process. This is not a limitation of the parser but a safety
|
30
32
|
* boundary feature, use XML_PARSE_HUGE option to override it.
|
31
33
|
*/
|
32
|
-
|
34
|
+
XML_DEPRECATED
|
35
|
+
XMLPUBVAR const unsigned int xmlParserMaxDepth;
|
33
36
|
|
34
37
|
/**
|
35
38
|
* XML_MAX_TEXT_LENGTH:
|
@@ -313,9 +316,14 @@ XMLPUBFUN xmlParserCtxtPtr
|
|
313
316
|
xmlCreateEntityParserCtxt(const xmlChar *URL,
|
314
317
|
const xmlChar *ID,
|
315
318
|
const xmlChar *base);
|
319
|
+
XMLPUBFUN void
|
320
|
+
xmlCtxtErrMemory (xmlParserCtxtPtr ctxt);
|
316
321
|
XMLPUBFUN int
|
317
322
|
xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
|
318
323
|
xmlCharEncoding enc);
|
324
|
+
XMLPUBFUN int
|
325
|
+
xmlSwitchEncodingName (xmlParserCtxtPtr ctxt,
|
326
|
+
const char *encoding);
|
319
327
|
XMLPUBFUN int
|
320
328
|
xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
|
321
329
|
xmlCharEncodingHandlerPtr handler);
|