nokogiri 1.11.0.rc3-x86-linux → 1.11.0.rc4-x86-linux
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of nokogiri might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/LICENSE-DEPENDENCIES.md +1015 -947
- data/README.md +1 -1
- data/ext/nokogiri/depend +476 -357
- data/ext/nokogiri/extconf.rb +441 -321
- data/ext/nokogiri/html_document.c +79 -78
- data/ext/nokogiri/html_sax_parser_context.c +2 -2
- data/ext/nokogiri/include/libexslt/exslt.h +102 -0
- data/ext/nokogiri/include/libexslt/exsltconfig.h +70 -0
- data/ext/nokogiri/include/libexslt/exsltexports.h +140 -0
- data/ext/nokogiri/include/libxml2/libxml/DOCBparser.h +96 -0
- data/ext/nokogiri/include/libxml2/libxml/HTMLparser.h +306 -0
- data/ext/nokogiri/include/libxml2/libxml/HTMLtree.h +147 -0
- data/ext/nokogiri/include/libxml2/libxml/SAX.h +173 -0
- data/ext/nokogiri/include/libxml2/libxml/SAX2.h +178 -0
- data/ext/nokogiri/include/libxml2/libxml/c14n.h +126 -0
- data/ext/nokogiri/include/libxml2/libxml/catalog.h +182 -0
- data/ext/nokogiri/include/libxml2/libxml/chvalid.h +230 -0
- data/ext/nokogiri/include/libxml2/libxml/debugXML.h +217 -0
- data/ext/nokogiri/include/libxml2/libxml/dict.h +79 -0
- data/ext/nokogiri/include/libxml2/libxml/encoding.h +245 -0
- data/ext/nokogiri/include/libxml2/libxml/entities.h +151 -0
- data/ext/nokogiri/include/libxml2/libxml/globals.h +508 -0
- data/ext/nokogiri/include/libxml2/libxml/hash.h +236 -0
- data/ext/nokogiri/include/libxml2/libxml/list.h +137 -0
- data/ext/nokogiri/include/libxml2/libxml/nanoftp.h +163 -0
- data/ext/nokogiri/include/libxml2/libxml/nanohttp.h +81 -0
- data/ext/nokogiri/include/libxml2/libxml/parser.h +1241 -0
- data/ext/nokogiri/include/libxml2/libxml/parserInternals.h +644 -0
- data/ext/nokogiri/include/libxml2/libxml/pattern.h +100 -0
- data/ext/nokogiri/include/libxml2/libxml/relaxng.h +217 -0
- data/ext/nokogiri/include/libxml2/libxml/schemasInternals.h +958 -0
- data/ext/nokogiri/include/libxml2/libxml/schematron.h +142 -0
- data/ext/nokogiri/include/libxml2/libxml/threads.h +89 -0
- data/ext/nokogiri/include/libxml2/libxml/tree.h +1311 -0
- data/ext/nokogiri/include/libxml2/libxml/uri.h +94 -0
- data/ext/nokogiri/include/libxml2/libxml/valid.h +458 -0
- data/ext/nokogiri/include/libxml2/libxml/xinclude.h +129 -0
- data/ext/nokogiri/include/libxml2/libxml/xlink.h +189 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlIO.h +366 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlautomata.h +146 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlerror.h +945 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlexports.h +153 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlmemory.h +224 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlmodule.h +57 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlreader.h +428 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlregexp.h +222 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlsave.h +88 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlschemas.h +246 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlschemastypes.h +151 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlstring.h +140 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlunicode.h +202 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlversion.h +485 -0
- data/ext/nokogiri/include/libxml2/libxml/xmlwriter.h +488 -0
- data/ext/nokogiri/include/libxml2/libxml/xpath.h +566 -0
- data/ext/nokogiri/include/libxml2/libxml/xpathInternals.h +632 -0
- data/ext/nokogiri/include/libxml2/libxml/xpointer.h +114 -0
- data/ext/nokogiri/include/libxslt/attributes.h +38 -0
- data/ext/nokogiri/include/libxslt/documents.h +93 -0
- data/ext/nokogiri/include/libxslt/extensions.h +262 -0
- data/ext/nokogiri/include/libxslt/extra.h +72 -0
- data/ext/nokogiri/include/libxslt/functions.h +78 -0
- data/ext/nokogiri/include/libxslt/imports.h +75 -0
- data/ext/nokogiri/include/libxslt/keys.h +53 -0
- data/ext/nokogiri/include/libxslt/namespaces.h +68 -0
- data/ext/nokogiri/include/libxslt/numbersInternals.h +73 -0
- data/ext/nokogiri/include/libxslt/pattern.h +84 -0
- data/ext/nokogiri/include/libxslt/preproc.h +43 -0
- data/ext/nokogiri/include/libxslt/security.h +104 -0
- data/ext/nokogiri/include/libxslt/templates.h +77 -0
- data/ext/nokogiri/include/libxslt/transform.h +207 -0
- data/ext/nokogiri/include/libxslt/variables.h +118 -0
- data/ext/nokogiri/include/libxslt/xslt.h +110 -0
- data/ext/nokogiri/include/libxslt/xsltInternals.h +1978 -0
- data/ext/nokogiri/include/libxslt/xsltconfig.h +180 -0
- data/ext/nokogiri/include/libxslt/xsltexports.h +142 -0
- data/ext/nokogiri/include/libxslt/xsltlocale.h +76 -0
- data/ext/nokogiri/include/libxslt/xsltutils.h +313 -0
- data/ext/nokogiri/nokogiri.c +34 -46
- data/ext/nokogiri/nokogiri.h +22 -26
- data/ext/nokogiri/xml_document.c +2 -2
- data/ext/nokogiri/xml_node.c +1 -1
- data/ext/nokogiri/xml_node_set.c +1 -1
- data/ext/nokogiri/xml_relax_ng.c +29 -11
- data/ext/nokogiri/xml_sax_parser.c +2 -7
- data/ext/nokogiri/xml_sax_parser_context.c +2 -2
- data/ext/nokogiri/xml_schema.c +55 -13
- data/ext/nokogiri/xml_xpath_context.c +80 -4
- data/ext/nokogiri/xslt_stylesheet.c +1 -4
- data/lib/nokogiri.rb +1 -1
- data/lib/nokogiri/2.5/nokogiri.so +0 -0
- data/lib/nokogiri/2.6/nokogiri.so +0 -0
- data/lib/nokogiri/2.7/nokogiri.so +0 -0
- data/lib/nokogiri/3.0/nokogiri.so +0 -0
- data/lib/nokogiri/css/parser.rb +3 -3
- data/lib/nokogiri/css/parser.y +2 -2
- data/lib/nokogiri/css/xpath_visitor.rb +70 -42
- data/lib/nokogiri/html/document.rb +12 -26
- data/lib/nokogiri/version.rb +2 -149
- data/lib/nokogiri/version/constant.rb +5 -0
- data/lib/nokogiri/version/info.rb +182 -0
- data/lib/nokogiri/xml/document.rb +17 -7
- data/lib/nokogiri/xml/document_fragment.rb +4 -6
- data/lib/nokogiri/xml/node.rb +50 -27
- data/lib/nokogiri/xml/parse_options.rb +6 -0
- data/lib/nokogiri/xml/relax_ng.rb +6 -2
- data/lib/nokogiri/xml/schema.rb +12 -4
- data/lib/nokogiri/xml/searchable.rb +3 -1
- metadata +105 -28
- data/lib/nokogiri/2.4/nokogiri.so +0 -0
@@ -0,0 +1,153 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: macros for marking symbols as exportable/importable.
|
3
|
+
* Description: macros for marking symbols as exportable/importable.
|
4
|
+
*
|
5
|
+
* Copy: See Copyright for the status of this software.
|
6
|
+
*
|
7
|
+
* Author: Igor Zlatovic <igor@zlatkovic.com>
|
8
|
+
*/
|
9
|
+
|
10
|
+
#ifndef __XML_EXPORTS_H__
|
11
|
+
#define __XML_EXPORTS_H__
|
12
|
+
|
13
|
+
/**
|
14
|
+
* XMLPUBFUN, XMLPUBVAR, XMLCALL
|
15
|
+
*
|
16
|
+
* Macros which declare an exportable function, an exportable variable and
|
17
|
+
* the calling convention used for functions.
|
18
|
+
*
|
19
|
+
* Please use an extra block for every platform/compiler combination when
|
20
|
+
* modifying this, rather than overlong #ifdef lines. This helps
|
21
|
+
* readability as well as the fact that different compilers on the same
|
22
|
+
* platform might need different definitions.
|
23
|
+
*/
|
24
|
+
|
25
|
+
/**
|
26
|
+
* XMLPUBFUN:
|
27
|
+
*
|
28
|
+
* Macros which declare an exportable function
|
29
|
+
*/
|
30
|
+
#define XMLPUBFUN
|
31
|
+
/**
|
32
|
+
* XMLPUBVAR:
|
33
|
+
*
|
34
|
+
* Macros which declare an exportable variable
|
35
|
+
*/
|
36
|
+
#define XMLPUBVAR extern
|
37
|
+
/**
|
38
|
+
* XMLCALL:
|
39
|
+
*
|
40
|
+
* Macros which declare the called convention for exported functions
|
41
|
+
*/
|
42
|
+
#define XMLCALL
|
43
|
+
/**
|
44
|
+
* XMLCDECL:
|
45
|
+
*
|
46
|
+
* Macro which declares the calling convention for exported functions that
|
47
|
+
* use '...'.
|
48
|
+
*/
|
49
|
+
#define XMLCDECL
|
50
|
+
|
51
|
+
/** DOC_DISABLE */
|
52
|
+
|
53
|
+
/* Windows platform with MS compiler */
|
54
|
+
#if defined(_WIN32) && defined(_MSC_VER)
|
55
|
+
#undef XMLPUBFUN
|
56
|
+
#undef XMLPUBVAR
|
57
|
+
#undef XMLCALL
|
58
|
+
#undef XMLCDECL
|
59
|
+
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
60
|
+
#define XMLPUBFUN __declspec(dllexport)
|
61
|
+
#define XMLPUBVAR __declspec(dllexport)
|
62
|
+
#else
|
63
|
+
#define XMLPUBFUN
|
64
|
+
#if !defined(LIBXML_STATIC)
|
65
|
+
#define XMLPUBVAR __declspec(dllimport) extern
|
66
|
+
#else
|
67
|
+
#define XMLPUBVAR extern
|
68
|
+
#endif
|
69
|
+
#endif
|
70
|
+
#if defined(LIBXML_FASTCALL)
|
71
|
+
#define XMLCALL __fastcall
|
72
|
+
#else
|
73
|
+
#define XMLCALL __cdecl
|
74
|
+
#endif
|
75
|
+
#define XMLCDECL __cdecl
|
76
|
+
#endif
|
77
|
+
|
78
|
+
/* Windows platform with Borland compiler */
|
79
|
+
#if defined(_WIN32) && defined(__BORLANDC__)
|
80
|
+
#undef XMLPUBFUN
|
81
|
+
#undef XMLPUBVAR
|
82
|
+
#undef XMLCALL
|
83
|
+
#undef XMLCDECL
|
84
|
+
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
85
|
+
#define XMLPUBFUN __declspec(dllexport)
|
86
|
+
#define XMLPUBVAR __declspec(dllexport) extern
|
87
|
+
#else
|
88
|
+
#define XMLPUBFUN
|
89
|
+
#if !defined(LIBXML_STATIC)
|
90
|
+
#define XMLPUBVAR __declspec(dllimport) extern
|
91
|
+
#else
|
92
|
+
#define XMLPUBVAR extern
|
93
|
+
#endif
|
94
|
+
#endif
|
95
|
+
#define XMLCALL __cdecl
|
96
|
+
#define XMLCDECL __cdecl
|
97
|
+
#endif
|
98
|
+
|
99
|
+
/* Windows platform with GNU compiler (Mingw) */
|
100
|
+
#if defined(_WIN32) && defined(__MINGW32__)
|
101
|
+
#undef XMLPUBFUN
|
102
|
+
#undef XMLPUBVAR
|
103
|
+
#undef XMLCALL
|
104
|
+
#undef XMLCDECL
|
105
|
+
/*
|
106
|
+
* if defined(IN_LIBXML) this raises problems on mingw with msys
|
107
|
+
* _imp__xmlFree listed as missing. Try to workaround the problem
|
108
|
+
* by also making that declaration when compiling client code.
|
109
|
+
*/
|
110
|
+
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
111
|
+
#define XMLPUBFUN __declspec(dllexport)
|
112
|
+
#define XMLPUBVAR __declspec(dllexport) extern
|
113
|
+
#else
|
114
|
+
#define XMLPUBFUN
|
115
|
+
#if !defined(LIBXML_STATIC)
|
116
|
+
#define XMLPUBVAR __declspec(dllimport) extern
|
117
|
+
#else
|
118
|
+
#define XMLPUBVAR extern
|
119
|
+
#endif
|
120
|
+
#endif
|
121
|
+
#define XMLCALL __cdecl
|
122
|
+
#define XMLCDECL __cdecl
|
123
|
+
#endif
|
124
|
+
|
125
|
+
/* Cygwin platform (does not define _WIN32), GNU compiler */
|
126
|
+
#if defined(__CYGWIN__)
|
127
|
+
#undef XMLPUBFUN
|
128
|
+
#undef XMLPUBVAR
|
129
|
+
#undef XMLCALL
|
130
|
+
#undef XMLCDECL
|
131
|
+
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
132
|
+
#define XMLPUBFUN __declspec(dllexport)
|
133
|
+
#define XMLPUBVAR __declspec(dllexport)
|
134
|
+
#else
|
135
|
+
#define XMLPUBFUN
|
136
|
+
#if !defined(LIBXML_STATIC)
|
137
|
+
#define XMLPUBVAR __declspec(dllimport) extern
|
138
|
+
#else
|
139
|
+
#define XMLPUBVAR extern
|
140
|
+
#endif
|
141
|
+
#endif
|
142
|
+
#define XMLCALL __cdecl
|
143
|
+
#define XMLCDECL __cdecl
|
144
|
+
#endif
|
145
|
+
|
146
|
+
/* Compatibility */
|
147
|
+
#if !defined(LIBXML_DLL_IMPORT)
|
148
|
+
#define LIBXML_DLL_IMPORT XMLPUBVAR
|
149
|
+
#endif
|
150
|
+
|
151
|
+
#endif /* __XML_EXPORTS_H__ */
|
152
|
+
|
153
|
+
|
@@ -0,0 +1,224 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: interface for the memory allocator
|
3
|
+
* Description: provides interfaces for the memory allocator,
|
4
|
+
* including debugging capabilities.
|
5
|
+
*
|
6
|
+
* Copy: See Copyright for the status of this software.
|
7
|
+
*
|
8
|
+
* Author: Daniel Veillard
|
9
|
+
*/
|
10
|
+
|
11
|
+
|
12
|
+
#ifndef __DEBUG_MEMORY_ALLOC__
|
13
|
+
#define __DEBUG_MEMORY_ALLOC__
|
14
|
+
|
15
|
+
#include <stdio.h>
|
16
|
+
#include <libxml/xmlversion.h>
|
17
|
+
|
18
|
+
/**
|
19
|
+
* DEBUG_MEMORY:
|
20
|
+
*
|
21
|
+
* DEBUG_MEMORY replaces the allocator with a collect and debug
|
22
|
+
* shell to the libc allocator.
|
23
|
+
* DEBUG_MEMORY should only be activated when debugging
|
24
|
+
* libxml i.e. if libxml has been configured with --with-debug-mem too.
|
25
|
+
*/
|
26
|
+
/* #define DEBUG_MEMORY_FREED */
|
27
|
+
/* #define DEBUG_MEMORY_LOCATION */
|
28
|
+
|
29
|
+
#ifdef DEBUG
|
30
|
+
#ifndef DEBUG_MEMORY
|
31
|
+
#define DEBUG_MEMORY
|
32
|
+
#endif
|
33
|
+
#endif
|
34
|
+
|
35
|
+
/**
|
36
|
+
* DEBUG_MEMORY_LOCATION:
|
37
|
+
*
|
38
|
+
* DEBUG_MEMORY_LOCATION should be activated only when debugging
|
39
|
+
* libxml i.e. if libxml has been configured with --with-debug-mem too.
|
40
|
+
*/
|
41
|
+
#ifdef DEBUG_MEMORY_LOCATION
|
42
|
+
#endif
|
43
|
+
|
44
|
+
#ifdef __cplusplus
|
45
|
+
extern "C" {
|
46
|
+
#endif
|
47
|
+
|
48
|
+
/*
|
49
|
+
* The XML memory wrapper support 4 basic overloadable functions.
|
50
|
+
*/
|
51
|
+
/**
|
52
|
+
* xmlFreeFunc:
|
53
|
+
* @mem: an already allocated block of memory
|
54
|
+
*
|
55
|
+
* Signature for a free() implementation.
|
56
|
+
*/
|
57
|
+
typedef void (XMLCALL *xmlFreeFunc)(void *mem);
|
58
|
+
/**
|
59
|
+
* xmlMallocFunc:
|
60
|
+
* @size: the size requested in bytes
|
61
|
+
*
|
62
|
+
* Signature for a malloc() implementation.
|
63
|
+
*
|
64
|
+
* Returns a pointer to the newly allocated block or NULL in case of error.
|
65
|
+
*/
|
66
|
+
typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size);
|
67
|
+
|
68
|
+
/**
|
69
|
+
* xmlReallocFunc:
|
70
|
+
* @mem: an already allocated block of memory
|
71
|
+
* @size: the new size requested in bytes
|
72
|
+
*
|
73
|
+
* Signature for a realloc() implementation.
|
74
|
+
*
|
75
|
+
* Returns a pointer to the newly reallocated block or NULL in case of error.
|
76
|
+
*/
|
77
|
+
typedef void *(XMLCALL *xmlReallocFunc)(void *mem, size_t size);
|
78
|
+
|
79
|
+
/**
|
80
|
+
* xmlStrdupFunc:
|
81
|
+
* @str: a zero terminated string
|
82
|
+
*
|
83
|
+
* Signature for an strdup() implementation.
|
84
|
+
*
|
85
|
+
* Returns the copy of the string or NULL in case of error.
|
86
|
+
*/
|
87
|
+
typedef char *(XMLCALL *xmlStrdupFunc)(const char *str);
|
88
|
+
|
89
|
+
/*
|
90
|
+
* The 4 interfaces used for all memory handling within libxml.
|
91
|
+
LIBXML_DLL_IMPORT xmlFreeFunc xmlFree;
|
92
|
+
LIBXML_DLL_IMPORT xmlMallocFunc xmlMalloc;
|
93
|
+
LIBXML_DLL_IMPORT xmlMallocFunc xmlMallocAtomic;
|
94
|
+
LIBXML_DLL_IMPORT xmlReallocFunc xmlRealloc;
|
95
|
+
LIBXML_DLL_IMPORT xmlStrdupFunc xmlMemStrdup;
|
96
|
+
*/
|
97
|
+
|
98
|
+
/*
|
99
|
+
* The way to overload the existing functions.
|
100
|
+
* The xmlGc function have an extra entry for atomic block
|
101
|
+
* allocations useful for garbage collected memory allocators
|
102
|
+
*/
|
103
|
+
XMLPUBFUN int XMLCALL
|
104
|
+
xmlMemSetup (xmlFreeFunc freeFunc,
|
105
|
+
xmlMallocFunc mallocFunc,
|
106
|
+
xmlReallocFunc reallocFunc,
|
107
|
+
xmlStrdupFunc strdupFunc);
|
108
|
+
XMLPUBFUN int XMLCALL
|
109
|
+
xmlMemGet (xmlFreeFunc *freeFunc,
|
110
|
+
xmlMallocFunc *mallocFunc,
|
111
|
+
xmlReallocFunc *reallocFunc,
|
112
|
+
xmlStrdupFunc *strdupFunc);
|
113
|
+
XMLPUBFUN int XMLCALL
|
114
|
+
xmlGcMemSetup (xmlFreeFunc freeFunc,
|
115
|
+
xmlMallocFunc mallocFunc,
|
116
|
+
xmlMallocFunc mallocAtomicFunc,
|
117
|
+
xmlReallocFunc reallocFunc,
|
118
|
+
xmlStrdupFunc strdupFunc);
|
119
|
+
XMLPUBFUN int XMLCALL
|
120
|
+
xmlGcMemGet (xmlFreeFunc *freeFunc,
|
121
|
+
xmlMallocFunc *mallocFunc,
|
122
|
+
xmlMallocFunc *mallocAtomicFunc,
|
123
|
+
xmlReallocFunc *reallocFunc,
|
124
|
+
xmlStrdupFunc *strdupFunc);
|
125
|
+
|
126
|
+
/*
|
127
|
+
* Initialization of the memory layer.
|
128
|
+
*/
|
129
|
+
XMLPUBFUN int XMLCALL
|
130
|
+
xmlInitMemory (void);
|
131
|
+
|
132
|
+
/*
|
133
|
+
* Cleanup of the memory layer.
|
134
|
+
*/
|
135
|
+
XMLPUBFUN void XMLCALL
|
136
|
+
xmlCleanupMemory (void);
|
137
|
+
/*
|
138
|
+
* These are specific to the XML debug memory wrapper.
|
139
|
+
*/
|
140
|
+
XMLPUBFUN int XMLCALL
|
141
|
+
xmlMemUsed (void);
|
142
|
+
XMLPUBFUN int XMLCALL
|
143
|
+
xmlMemBlocks (void);
|
144
|
+
XMLPUBFUN void XMLCALL
|
145
|
+
xmlMemDisplay (FILE *fp);
|
146
|
+
XMLPUBFUN void XMLCALL
|
147
|
+
xmlMemDisplayLast(FILE *fp, long nbBytes);
|
148
|
+
XMLPUBFUN void XMLCALL
|
149
|
+
xmlMemShow (FILE *fp, int nr);
|
150
|
+
XMLPUBFUN void XMLCALL
|
151
|
+
xmlMemoryDump (void);
|
152
|
+
XMLPUBFUN void * XMLCALL
|
153
|
+
xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1);
|
154
|
+
XMLPUBFUN void * XMLCALL
|
155
|
+
xmlMemRealloc (void *ptr,size_t size);
|
156
|
+
XMLPUBFUN void XMLCALL
|
157
|
+
xmlMemFree (void *ptr);
|
158
|
+
XMLPUBFUN char * XMLCALL
|
159
|
+
xmlMemoryStrdup (const char *str);
|
160
|
+
XMLPUBFUN void * XMLCALL
|
161
|
+
xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
|
162
|
+
XMLPUBFUN void * XMLCALL
|
163
|
+
xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
|
164
|
+
XMLPUBFUN void * XMLCALL
|
165
|
+
xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
|
166
|
+
XMLPUBFUN char * XMLCALL
|
167
|
+
xmlMemStrdupLoc (const char *str, const char *file, int line);
|
168
|
+
|
169
|
+
|
170
|
+
#ifdef DEBUG_MEMORY_LOCATION
|
171
|
+
/**
|
172
|
+
* xmlMalloc:
|
173
|
+
* @size: number of bytes to allocate
|
174
|
+
*
|
175
|
+
* Wrapper for the malloc() function used in the XML library.
|
176
|
+
*
|
177
|
+
* Returns the pointer to the allocated area or NULL in case of error.
|
178
|
+
*/
|
179
|
+
#define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__)
|
180
|
+
/**
|
181
|
+
* xmlMallocAtomic:
|
182
|
+
* @size: number of bytes to allocate
|
183
|
+
*
|
184
|
+
* Wrapper for the malloc() function used in the XML library for allocation
|
185
|
+
* of block not containing pointers to other areas.
|
186
|
+
*
|
187
|
+
* Returns the pointer to the allocated area or NULL in case of error.
|
188
|
+
*/
|
189
|
+
#define xmlMallocAtomic(size) xmlMallocAtomicLoc((size), __FILE__, __LINE__)
|
190
|
+
/**
|
191
|
+
* xmlRealloc:
|
192
|
+
* @ptr: pointer to the existing allocated area
|
193
|
+
* @size: number of bytes to allocate
|
194
|
+
*
|
195
|
+
* Wrapper for the realloc() function used in the XML library.
|
196
|
+
*
|
197
|
+
* Returns the pointer to the allocated area or NULL in case of error.
|
198
|
+
*/
|
199
|
+
#define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__)
|
200
|
+
/**
|
201
|
+
* xmlMemStrdup:
|
202
|
+
* @str: pointer to the existing string
|
203
|
+
*
|
204
|
+
* Wrapper for the strdup() function, xmlStrdup() is usually preferred.
|
205
|
+
*
|
206
|
+
* Returns the pointer to the allocated area or NULL in case of error.
|
207
|
+
*/
|
208
|
+
#define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)
|
209
|
+
|
210
|
+
#endif /* DEBUG_MEMORY_LOCATION */
|
211
|
+
|
212
|
+
#ifdef __cplusplus
|
213
|
+
}
|
214
|
+
#endif /* __cplusplus */
|
215
|
+
|
216
|
+
#ifndef __XML_GLOBALS_H
|
217
|
+
#ifndef __XML_THREADS_H__
|
218
|
+
#include <libxml/threads.h>
|
219
|
+
#include <libxml/globals.h>
|
220
|
+
#endif
|
221
|
+
#endif
|
222
|
+
|
223
|
+
#endif /* __DEBUG_MEMORY_ALLOC__ */
|
224
|
+
|
@@ -0,0 +1,57 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: dynamic module loading
|
3
|
+
* Description: basic API for dynamic module loading, used by
|
4
|
+
* libexslt added in 2.6.17
|
5
|
+
*
|
6
|
+
* Copy: See Copyright for the status of this software.
|
7
|
+
*
|
8
|
+
* Author: Joel W. Reed
|
9
|
+
*/
|
10
|
+
|
11
|
+
#ifndef __XML_MODULE_H__
|
12
|
+
#define __XML_MODULE_H__
|
13
|
+
|
14
|
+
#include <libxml/xmlversion.h>
|
15
|
+
|
16
|
+
#ifdef LIBXML_MODULES_ENABLED
|
17
|
+
|
18
|
+
#ifdef __cplusplus
|
19
|
+
extern "C" {
|
20
|
+
#endif
|
21
|
+
|
22
|
+
/**
|
23
|
+
* xmlModulePtr:
|
24
|
+
*
|
25
|
+
* A handle to a dynamically loaded module
|
26
|
+
*/
|
27
|
+
typedef struct _xmlModule xmlModule;
|
28
|
+
typedef xmlModule *xmlModulePtr;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* xmlModuleOption:
|
32
|
+
*
|
33
|
+
* enumeration of options that can be passed down to xmlModuleOpen()
|
34
|
+
*/
|
35
|
+
typedef enum {
|
36
|
+
XML_MODULE_LAZY = 1, /* lazy binding */
|
37
|
+
XML_MODULE_LOCAL= 2 /* local binding */
|
38
|
+
} xmlModuleOption;
|
39
|
+
|
40
|
+
XMLPUBFUN xmlModulePtr XMLCALL xmlModuleOpen (const char *filename,
|
41
|
+
int options);
|
42
|
+
|
43
|
+
XMLPUBFUN int XMLCALL xmlModuleSymbol (xmlModulePtr module,
|
44
|
+
const char* name,
|
45
|
+
void **result);
|
46
|
+
|
47
|
+
XMLPUBFUN int XMLCALL xmlModuleClose (xmlModulePtr module);
|
48
|
+
|
49
|
+
XMLPUBFUN int XMLCALL xmlModuleFree (xmlModulePtr module);
|
50
|
+
|
51
|
+
#ifdef __cplusplus
|
52
|
+
}
|
53
|
+
#endif
|
54
|
+
|
55
|
+
#endif /* LIBXML_MODULES_ENABLED */
|
56
|
+
|
57
|
+
#endif /*__XML_MODULE_H__ */
|
@@ -0,0 +1,428 @@
|
|
1
|
+
/*
|
2
|
+
* Summary: the XMLReader implementation
|
3
|
+
* Description: API of the XML streaming API based on C# interfaces.
|
4
|
+
*
|
5
|
+
* Copy: See Copyright for the status of this software.
|
6
|
+
*
|
7
|
+
* Author: Daniel Veillard
|
8
|
+
*/
|
9
|
+
|
10
|
+
#ifndef __XML_XMLREADER_H__
|
11
|
+
#define __XML_XMLREADER_H__
|
12
|
+
|
13
|
+
#include <libxml/xmlversion.h>
|
14
|
+
#include <libxml/tree.h>
|
15
|
+
#include <libxml/xmlIO.h>
|
16
|
+
#ifdef LIBXML_SCHEMAS_ENABLED
|
17
|
+
#include <libxml/relaxng.h>
|
18
|
+
#include <libxml/xmlschemas.h>
|
19
|
+
#endif
|
20
|
+
|
21
|
+
#ifdef __cplusplus
|
22
|
+
extern "C" {
|
23
|
+
#endif
|
24
|
+
|
25
|
+
/**
|
26
|
+
* xmlParserSeverities:
|
27
|
+
*
|
28
|
+
* How severe an error callback is when the per-reader error callback API
|
29
|
+
* is used.
|
30
|
+
*/
|
31
|
+
typedef enum {
|
32
|
+
XML_PARSER_SEVERITY_VALIDITY_WARNING = 1,
|
33
|
+
XML_PARSER_SEVERITY_VALIDITY_ERROR = 2,
|
34
|
+
XML_PARSER_SEVERITY_WARNING = 3,
|
35
|
+
XML_PARSER_SEVERITY_ERROR = 4
|
36
|
+
} xmlParserSeverities;
|
37
|
+
|
38
|
+
#ifdef LIBXML_READER_ENABLED
|
39
|
+
|
40
|
+
/**
|
41
|
+
* xmlTextReaderMode:
|
42
|
+
*
|
43
|
+
* Internal state values for the reader.
|
44
|
+
*/
|
45
|
+
typedef enum {
|
46
|
+
XML_TEXTREADER_MODE_INITIAL = 0,
|
47
|
+
XML_TEXTREADER_MODE_INTERACTIVE = 1,
|
48
|
+
XML_TEXTREADER_MODE_ERROR = 2,
|
49
|
+
XML_TEXTREADER_MODE_EOF =3,
|
50
|
+
XML_TEXTREADER_MODE_CLOSED = 4,
|
51
|
+
XML_TEXTREADER_MODE_READING = 5
|
52
|
+
} xmlTextReaderMode;
|
53
|
+
|
54
|
+
/**
|
55
|
+
* xmlParserProperties:
|
56
|
+
*
|
57
|
+
* Some common options to use with xmlTextReaderSetParserProp, but it
|
58
|
+
* is better to use xmlParserOption and the xmlReaderNewxxx and
|
59
|
+
* xmlReaderForxxx APIs now.
|
60
|
+
*/
|
61
|
+
typedef enum {
|
62
|
+
XML_PARSER_LOADDTD = 1,
|
63
|
+
XML_PARSER_DEFAULTATTRS = 2,
|
64
|
+
XML_PARSER_VALIDATE = 3,
|
65
|
+
XML_PARSER_SUBST_ENTITIES = 4
|
66
|
+
} xmlParserProperties;
|
67
|
+
|
68
|
+
/**
|
69
|
+
* xmlReaderTypes:
|
70
|
+
*
|
71
|
+
* Predefined constants for the different types of nodes.
|
72
|
+
*/
|
73
|
+
typedef enum {
|
74
|
+
XML_READER_TYPE_NONE = 0,
|
75
|
+
XML_READER_TYPE_ELEMENT = 1,
|
76
|
+
XML_READER_TYPE_ATTRIBUTE = 2,
|
77
|
+
XML_READER_TYPE_TEXT = 3,
|
78
|
+
XML_READER_TYPE_CDATA = 4,
|
79
|
+
XML_READER_TYPE_ENTITY_REFERENCE = 5,
|
80
|
+
XML_READER_TYPE_ENTITY = 6,
|
81
|
+
XML_READER_TYPE_PROCESSING_INSTRUCTION = 7,
|
82
|
+
XML_READER_TYPE_COMMENT = 8,
|
83
|
+
XML_READER_TYPE_DOCUMENT = 9,
|
84
|
+
XML_READER_TYPE_DOCUMENT_TYPE = 10,
|
85
|
+
XML_READER_TYPE_DOCUMENT_FRAGMENT = 11,
|
86
|
+
XML_READER_TYPE_NOTATION = 12,
|
87
|
+
XML_READER_TYPE_WHITESPACE = 13,
|
88
|
+
XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14,
|
89
|
+
XML_READER_TYPE_END_ELEMENT = 15,
|
90
|
+
XML_READER_TYPE_END_ENTITY = 16,
|
91
|
+
XML_READER_TYPE_XML_DECLARATION = 17
|
92
|
+
} xmlReaderTypes;
|
93
|
+
|
94
|
+
/**
|
95
|
+
* xmlTextReader:
|
96
|
+
*
|
97
|
+
* Structure for an xmlReader context.
|
98
|
+
*/
|
99
|
+
typedef struct _xmlTextReader xmlTextReader;
|
100
|
+
|
101
|
+
/**
|
102
|
+
* xmlTextReaderPtr:
|
103
|
+
*
|
104
|
+
* Pointer to an xmlReader context.
|
105
|
+
*/
|
106
|
+
typedef xmlTextReader *xmlTextReaderPtr;
|
107
|
+
|
108
|
+
/*
|
109
|
+
* Constructors & Destructor
|
110
|
+
*/
|
111
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
112
|
+
xmlNewTextReader (xmlParserInputBufferPtr input,
|
113
|
+
const char *URI);
|
114
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
115
|
+
xmlNewTextReaderFilename(const char *URI);
|
116
|
+
|
117
|
+
XMLPUBFUN void XMLCALL
|
118
|
+
xmlFreeTextReader (xmlTextReaderPtr reader);
|
119
|
+
|
120
|
+
XMLPUBFUN int XMLCALL
|
121
|
+
xmlTextReaderSetup(xmlTextReaderPtr reader,
|
122
|
+
xmlParserInputBufferPtr input, const char *URL,
|
123
|
+
const char *encoding, int options);
|
124
|
+
|
125
|
+
/*
|
126
|
+
* Iterators
|
127
|
+
*/
|
128
|
+
XMLPUBFUN int XMLCALL
|
129
|
+
xmlTextReaderRead (xmlTextReaderPtr reader);
|
130
|
+
|
131
|
+
#ifdef LIBXML_WRITER_ENABLED
|
132
|
+
XMLPUBFUN xmlChar * XMLCALL
|
133
|
+
xmlTextReaderReadInnerXml(xmlTextReaderPtr reader);
|
134
|
+
|
135
|
+
XMLPUBFUN xmlChar * XMLCALL
|
136
|
+
xmlTextReaderReadOuterXml(xmlTextReaderPtr reader);
|
137
|
+
#endif
|
138
|
+
|
139
|
+
XMLPUBFUN xmlChar * XMLCALL
|
140
|
+
xmlTextReaderReadString (xmlTextReaderPtr reader);
|
141
|
+
XMLPUBFUN int XMLCALL
|
142
|
+
xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader);
|
143
|
+
|
144
|
+
/*
|
145
|
+
* Attributes of the node
|
146
|
+
*/
|
147
|
+
XMLPUBFUN int XMLCALL
|
148
|
+
xmlTextReaderAttributeCount(xmlTextReaderPtr reader);
|
149
|
+
XMLPUBFUN int XMLCALL
|
150
|
+
xmlTextReaderDepth (xmlTextReaderPtr reader);
|
151
|
+
XMLPUBFUN int XMLCALL
|
152
|
+
xmlTextReaderHasAttributes(xmlTextReaderPtr reader);
|
153
|
+
XMLPUBFUN int XMLCALL
|
154
|
+
xmlTextReaderHasValue(xmlTextReaderPtr reader);
|
155
|
+
XMLPUBFUN int XMLCALL
|
156
|
+
xmlTextReaderIsDefault (xmlTextReaderPtr reader);
|
157
|
+
XMLPUBFUN int XMLCALL
|
158
|
+
xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader);
|
159
|
+
XMLPUBFUN int XMLCALL
|
160
|
+
xmlTextReaderNodeType (xmlTextReaderPtr reader);
|
161
|
+
XMLPUBFUN int XMLCALL
|
162
|
+
xmlTextReaderQuoteChar (xmlTextReaderPtr reader);
|
163
|
+
XMLPUBFUN int XMLCALL
|
164
|
+
xmlTextReaderReadState (xmlTextReaderPtr reader);
|
165
|
+
XMLPUBFUN int XMLCALL
|
166
|
+
xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader);
|
167
|
+
|
168
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
169
|
+
xmlTextReaderConstBaseUri (xmlTextReaderPtr reader);
|
170
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
171
|
+
xmlTextReaderConstLocalName (xmlTextReaderPtr reader);
|
172
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
173
|
+
xmlTextReaderConstName (xmlTextReaderPtr reader);
|
174
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
175
|
+
xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader);
|
176
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
177
|
+
xmlTextReaderConstPrefix (xmlTextReaderPtr reader);
|
178
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
179
|
+
xmlTextReaderConstXmlLang (xmlTextReaderPtr reader);
|
180
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
181
|
+
xmlTextReaderConstString (xmlTextReaderPtr reader,
|
182
|
+
const xmlChar *str);
|
183
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
184
|
+
xmlTextReaderConstValue (xmlTextReaderPtr reader);
|
185
|
+
|
186
|
+
/*
|
187
|
+
* use the Const version of the routine for
|
188
|
+
* better performance and simpler code
|
189
|
+
*/
|
190
|
+
XMLPUBFUN xmlChar * XMLCALL
|
191
|
+
xmlTextReaderBaseUri (xmlTextReaderPtr reader);
|
192
|
+
XMLPUBFUN xmlChar * XMLCALL
|
193
|
+
xmlTextReaderLocalName (xmlTextReaderPtr reader);
|
194
|
+
XMLPUBFUN xmlChar * XMLCALL
|
195
|
+
xmlTextReaderName (xmlTextReaderPtr reader);
|
196
|
+
XMLPUBFUN xmlChar * XMLCALL
|
197
|
+
xmlTextReaderNamespaceUri(xmlTextReaderPtr reader);
|
198
|
+
XMLPUBFUN xmlChar * XMLCALL
|
199
|
+
xmlTextReaderPrefix (xmlTextReaderPtr reader);
|
200
|
+
XMLPUBFUN xmlChar * XMLCALL
|
201
|
+
xmlTextReaderXmlLang (xmlTextReaderPtr reader);
|
202
|
+
XMLPUBFUN xmlChar * XMLCALL
|
203
|
+
xmlTextReaderValue (xmlTextReaderPtr reader);
|
204
|
+
|
205
|
+
/*
|
206
|
+
* Methods of the XmlTextReader
|
207
|
+
*/
|
208
|
+
XMLPUBFUN int XMLCALL
|
209
|
+
xmlTextReaderClose (xmlTextReaderPtr reader);
|
210
|
+
XMLPUBFUN xmlChar * XMLCALL
|
211
|
+
xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
|
212
|
+
int no);
|
213
|
+
XMLPUBFUN xmlChar * XMLCALL
|
214
|
+
xmlTextReaderGetAttribute (xmlTextReaderPtr reader,
|
215
|
+
const xmlChar *name);
|
216
|
+
XMLPUBFUN xmlChar * XMLCALL
|
217
|
+
xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader,
|
218
|
+
const xmlChar *localName,
|
219
|
+
const xmlChar *namespaceURI);
|
220
|
+
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
221
|
+
xmlTextReaderGetRemainder (xmlTextReaderPtr reader);
|
222
|
+
XMLPUBFUN xmlChar * XMLCALL
|
223
|
+
xmlTextReaderLookupNamespace(xmlTextReaderPtr reader,
|
224
|
+
const xmlChar *prefix);
|
225
|
+
XMLPUBFUN int XMLCALL
|
226
|
+
xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader,
|
227
|
+
int no);
|
228
|
+
XMLPUBFUN int XMLCALL
|
229
|
+
xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader,
|
230
|
+
const xmlChar *name);
|
231
|
+
XMLPUBFUN int XMLCALL
|
232
|
+
xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
|
233
|
+
const xmlChar *localName,
|
234
|
+
const xmlChar *namespaceURI);
|
235
|
+
XMLPUBFUN int XMLCALL
|
236
|
+
xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
|
237
|
+
XMLPUBFUN int XMLCALL
|
238
|
+
xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
|
239
|
+
XMLPUBFUN int XMLCALL
|
240
|
+
xmlTextReaderMoveToElement (xmlTextReaderPtr reader);
|
241
|
+
XMLPUBFUN int XMLCALL
|
242
|
+
xmlTextReaderNormalization (xmlTextReaderPtr reader);
|
243
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
244
|
+
xmlTextReaderConstEncoding (xmlTextReaderPtr reader);
|
245
|
+
|
246
|
+
/*
|
247
|
+
* Extensions
|
248
|
+
*/
|
249
|
+
XMLPUBFUN int XMLCALL
|
250
|
+
xmlTextReaderSetParserProp (xmlTextReaderPtr reader,
|
251
|
+
int prop,
|
252
|
+
int value);
|
253
|
+
XMLPUBFUN int XMLCALL
|
254
|
+
xmlTextReaderGetParserProp (xmlTextReaderPtr reader,
|
255
|
+
int prop);
|
256
|
+
XMLPUBFUN xmlNodePtr XMLCALL
|
257
|
+
xmlTextReaderCurrentNode (xmlTextReaderPtr reader);
|
258
|
+
|
259
|
+
XMLPUBFUN int XMLCALL
|
260
|
+
xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
|
261
|
+
|
262
|
+
XMLPUBFUN int XMLCALL
|
263
|
+
xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
|
264
|
+
|
265
|
+
XMLPUBFUN xmlNodePtr XMLCALL
|
266
|
+
xmlTextReaderPreserve (xmlTextReaderPtr reader);
|
267
|
+
#ifdef LIBXML_PATTERN_ENABLED
|
268
|
+
XMLPUBFUN int XMLCALL
|
269
|
+
xmlTextReaderPreservePattern(xmlTextReaderPtr reader,
|
270
|
+
const xmlChar *pattern,
|
271
|
+
const xmlChar **namespaces);
|
272
|
+
#endif /* LIBXML_PATTERN_ENABLED */
|
273
|
+
XMLPUBFUN xmlDocPtr XMLCALL
|
274
|
+
xmlTextReaderCurrentDoc (xmlTextReaderPtr reader);
|
275
|
+
XMLPUBFUN xmlNodePtr XMLCALL
|
276
|
+
xmlTextReaderExpand (xmlTextReaderPtr reader);
|
277
|
+
XMLPUBFUN int XMLCALL
|
278
|
+
xmlTextReaderNext (xmlTextReaderPtr reader);
|
279
|
+
XMLPUBFUN int XMLCALL
|
280
|
+
xmlTextReaderNextSibling (xmlTextReaderPtr reader);
|
281
|
+
XMLPUBFUN int XMLCALL
|
282
|
+
xmlTextReaderIsValid (xmlTextReaderPtr reader);
|
283
|
+
#ifdef LIBXML_SCHEMAS_ENABLED
|
284
|
+
XMLPUBFUN int XMLCALL
|
285
|
+
xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
|
286
|
+
const char *rng);
|
287
|
+
XMLPUBFUN int XMLCALL
|
288
|
+
xmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader,
|
289
|
+
xmlRelaxNGValidCtxtPtr ctxt,
|
290
|
+
int options);
|
291
|
+
|
292
|
+
XMLPUBFUN int XMLCALL
|
293
|
+
xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
|
294
|
+
xmlRelaxNGPtr schema);
|
295
|
+
XMLPUBFUN int XMLCALL
|
296
|
+
xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
|
297
|
+
const char *xsd);
|
298
|
+
XMLPUBFUN int XMLCALL
|
299
|
+
xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
|
300
|
+
xmlSchemaValidCtxtPtr ctxt,
|
301
|
+
int options);
|
302
|
+
XMLPUBFUN int XMLCALL
|
303
|
+
xmlTextReaderSetSchema (xmlTextReaderPtr reader,
|
304
|
+
xmlSchemaPtr schema);
|
305
|
+
#endif
|
306
|
+
XMLPUBFUN const xmlChar * XMLCALL
|
307
|
+
xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
|
308
|
+
XMLPUBFUN int XMLCALL
|
309
|
+
xmlTextReaderStandalone (xmlTextReaderPtr reader);
|
310
|
+
|
311
|
+
|
312
|
+
/*
|
313
|
+
* Index lookup
|
314
|
+
*/
|
315
|
+
XMLPUBFUN long XMLCALL
|
316
|
+
xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
|
317
|
+
|
318
|
+
/*
|
319
|
+
* New more complete APIs for simpler creation and reuse of readers
|
320
|
+
*/
|
321
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
322
|
+
xmlReaderWalker (xmlDocPtr doc);
|
323
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
324
|
+
xmlReaderForDoc (const xmlChar * cur,
|
325
|
+
const char *URL,
|
326
|
+
const char *encoding,
|
327
|
+
int options);
|
328
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
329
|
+
xmlReaderForFile (const char *filename,
|
330
|
+
const char *encoding,
|
331
|
+
int options);
|
332
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
333
|
+
xmlReaderForMemory (const char *buffer,
|
334
|
+
int size,
|
335
|
+
const char *URL,
|
336
|
+
const char *encoding,
|
337
|
+
int options);
|
338
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
339
|
+
xmlReaderForFd (int fd,
|
340
|
+
const char *URL,
|
341
|
+
const char *encoding,
|
342
|
+
int options);
|
343
|
+
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
344
|
+
xmlReaderForIO (xmlInputReadCallback ioread,
|
345
|
+
xmlInputCloseCallback ioclose,
|
346
|
+
void *ioctx,
|
347
|
+
const char *URL,
|
348
|
+
const char *encoding,
|
349
|
+
int options);
|
350
|
+
|
351
|
+
XMLPUBFUN int XMLCALL
|
352
|
+
xmlReaderNewWalker (xmlTextReaderPtr reader,
|
353
|
+
xmlDocPtr doc);
|
354
|
+
XMLPUBFUN int XMLCALL
|
355
|
+
xmlReaderNewDoc (xmlTextReaderPtr reader,
|
356
|
+
const xmlChar * cur,
|
357
|
+
const char *URL,
|
358
|
+
const char *encoding,
|
359
|
+
int options);
|
360
|
+
XMLPUBFUN int XMLCALL
|
361
|
+
xmlReaderNewFile (xmlTextReaderPtr reader,
|
362
|
+
const char *filename,
|
363
|
+
const char *encoding,
|
364
|
+
int options);
|
365
|
+
XMLPUBFUN int XMLCALL
|
366
|
+
xmlReaderNewMemory (xmlTextReaderPtr reader,
|
367
|
+
const char *buffer,
|
368
|
+
int size,
|
369
|
+
const char *URL,
|
370
|
+
const char *encoding,
|
371
|
+
int options);
|
372
|
+
XMLPUBFUN int XMLCALL
|
373
|
+
xmlReaderNewFd (xmlTextReaderPtr reader,
|
374
|
+
int fd,
|
375
|
+
const char *URL,
|
376
|
+
const char *encoding,
|
377
|
+
int options);
|
378
|
+
XMLPUBFUN int XMLCALL
|
379
|
+
xmlReaderNewIO (xmlTextReaderPtr reader,
|
380
|
+
xmlInputReadCallback ioread,
|
381
|
+
xmlInputCloseCallback ioclose,
|
382
|
+
void *ioctx,
|
383
|
+
const char *URL,
|
384
|
+
const char *encoding,
|
385
|
+
int options);
|
386
|
+
/*
|
387
|
+
* Error handling extensions
|
388
|
+
*/
|
389
|
+
typedef void * xmlTextReaderLocatorPtr;
|
390
|
+
|
391
|
+
/**
|
392
|
+
* xmlTextReaderErrorFunc:
|
393
|
+
* @arg: the user argument
|
394
|
+
* @msg: the message
|
395
|
+
* @severity: the severity of the error
|
396
|
+
* @locator: a locator indicating where the error occurred
|
397
|
+
*
|
398
|
+
* Signature of an error callback from a reader parser
|
399
|
+
*/
|
400
|
+
typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
|
401
|
+
const char *msg,
|
402
|
+
xmlParserSeverities severity,
|
403
|
+
xmlTextReaderLocatorPtr locator);
|
404
|
+
XMLPUBFUN int XMLCALL
|
405
|
+
xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
|
406
|
+
XMLPUBFUN xmlChar * XMLCALL
|
407
|
+
xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
|
408
|
+
XMLPUBFUN void XMLCALL
|
409
|
+
xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
|
410
|
+
xmlTextReaderErrorFunc f,
|
411
|
+
void *arg);
|
412
|
+
XMLPUBFUN void XMLCALL
|
413
|
+
xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
|
414
|
+
xmlStructuredErrorFunc f,
|
415
|
+
void *arg);
|
416
|
+
XMLPUBFUN void XMLCALL
|
417
|
+
xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
|
418
|
+
xmlTextReaderErrorFunc *f,
|
419
|
+
void **arg);
|
420
|
+
|
421
|
+
#endif /* LIBXML_READER_ENABLED */
|
422
|
+
|
423
|
+
#ifdef __cplusplus
|
424
|
+
}
|
425
|
+
#endif
|
426
|
+
|
427
|
+
#endif /* __XML_XMLREADER_H__ */
|
428
|
+
|