1 #ifndef LIBRARIES_EXPAT_H
2 #define LIBRARIES_EXPAT_H
5 ** $VER: expat.h 4.1 (5.5.2005)
6 ** Includes Release 4.1
8 ** Written by Alfonso [alfie] Ranieri <alforan@tin.it>.
10 ** Released under the terms of the
11 ** GNU Public Licence version 2.
18 #if defined(__GNUC__) || defined(__VBCC__)
22 typedef void *XML_Parser
;
23 typedef char XML_Char
;
24 typedef char XML_LChar
;
25 typedef unsigned char XML_Bool
;
27 #define XML_TRUE ((XML_Bool) 1)
28 #define XML_FALSE ((XML_Bool) 0)
35 XML_ERROR_NO_ELEMENTS
,
36 XML_ERROR_INVALID_TOKEN
,
37 XML_ERROR_UNCLOSED_TOKEN
,
38 XML_ERROR_PARTIAL_CHAR
,
39 XML_ERROR_TAG_MISMATCH
,
40 XML_ERROR_DUPLICATE_ATTRIBUTE
,
41 XML_ERROR_JUNK_AFTER_DOC_ELEMENT
,
42 XML_ERROR_PARAM_ENTITY_REF
,
43 XML_ERROR_UNDEFINED_ENTITY
,
44 XML_ERROR_RECURSIVE_ENTITY_REF
,
45 XML_ERROR_ASYNC_ENTITY
,
46 XML_ERROR_BAD_CHAR_REF
,
47 XML_ERROR_BINARY_ENTITY_REF
,
48 XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF
,
49 XML_ERROR_MISPLACED_XML_PI
,
50 XML_ERROR_UNKNOWN_ENCODING
,
51 XML_ERROR_INCORRECT_ENCODING
,
52 XML_ERROR_UNCLOSED_CDATA_SECTION
,
53 XML_ERROR_EXTERNAL_ENTITY_HANDLING
,
54 XML_ERROR_NOT_STANDALONE
,
55 XML_ERROR_UNEXPECTED_STATE
,
56 XML_ERROR_ENTITY_DECLARED_IN_PE
,
57 XML_ERROR_FEATURE_REQUIRES_XML_DTD
,
58 XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING
,
59 XML_ERROR_UNBOUND_PREFIX
,
60 XML_ERROR_UNDECLARING_PREFIX
,
61 XML_ERROR_INCOMPLETE_PE
,
66 XML_ERROR_NOT_SUSPENDED
,
82 enum XML_Content_Quant
90 typedef struct XML_cp XML_Content
;
94 enum XML_Content_Type type
;
95 enum XML_Content_Quant quant
;
97 unsigned int numchildren
;
98 XML_Content
*children
;
104 XML_STATUS_ERROR
= 0,
108 enum XML_ParamEntityParsing
110 XML_PARAM_ENTITY_PARSING_NEVER
,
111 XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE
,
112 XML_PARAM_ENTITY_PARSING_ALWAYS
126 XML_FEATURE_UNICODE_WCHAR_T
,
128 XML_FEATURE_CONTEXT_BYTES
,
129 XML_FEATURE_MIN_SIZE
,
130 XML_FEATURE_SIZEOF_XML_CHAR
,
131 XML_FEATURE_SIZEOF_XML_LCHAR
136 enum XML_FeatureEnum feature
;
151 enum XML_Parsing parsing
;
152 XML_Bool finalBuffer
;
158 void *(*malloc_fcn
)(size_t size
);
159 void *(*realloc_fcn
)(void *ptr
, size_t size
);
160 void (*free_fcn
)(void *ptr
);
161 } XML_Memory_Handling_Suite
;
167 int (*convert
)(void *data
, const char *s
);
168 void (*release
)(void *data
);
171 #define XML_MAJOR_VERSION 1
172 #define XML_MINOR_VERSION 95
173 #define XML_MICRO_VERSION 5
175 #define XML_GetUserData(parser) (*(void **)(parser))
179 typedef void (*XML_ElementDeclHandler
) (void *userData
,
180 const XML_Char
*name
,
183 typedef void (*XML_AttlistDeclHandler
) (void *userData
,
184 const XML_Char
*elname
,
185 const XML_Char
*attname
,
186 const XML_Char
*att_type
,
187 const XML_Char
*dflt
,
190 typedef void (*XML_XmlDeclHandler
) (void *userData
,
191 const XML_Char
*version
,
192 const XML_Char
*encoding
,
196 typedef void (*XML_StartElementHandler
)(void *userData
,
197 const XML_Char
*name
,
198 const XML_Char
**atts
);
200 typedef void (*XML_EndElementHandler
)(void *userData
,
201 const XML_Char
*name
);
203 typedef void (*XML_CharacterDataHandler
)(void *userData
,
207 typedef void (*XML_ProcessingInstructionHandler
)(void *userData
,
208 const XML_Char
*target
,
209 const XML_Char
*data
);
211 typedef void (*XML_CommentHandler
)(void *userData
,
212 const XML_Char
*data
);
214 typedef void (*XML_StartCdataSectionHandler
)(void *userData
);
216 typedef void (*XML_EndCdataSectionHandler
)(void *userData
);
218 typedef void (*XML_DefaultHandler
)(void *userData
,
222 typedef void (*XML_StartDoctypeDeclHandler
)(void *userData
,
223 const XML_Char
*doctypeName
,
224 const XML_Char
*sysid
,
225 const XML_Char
*pubid
,
226 int has_internal_subset
);
228 typedef void (*XML_EndDoctypeDeclHandler
)(void *userData
);
230 typedef void (*XML_EntityDeclHandler
) (void *userData
,
231 const XML_Char
*entityName
,
232 int is_parameter_entity
,
233 const XML_Char
*value
,
235 const XML_Char
*base
,
236 const XML_Char
*systemId
,
237 const XML_Char
*publicId
,
238 const XML_Char
*notationName
);
240 typedef void (*XML_UnparsedEntityDeclHandler
)(void *userData
,
241 const XML_Char
*entityName
,
242 const XML_Char
*base
,
243 const XML_Char
*systemId
,
244 const XML_Char
*publicId
,
245 const XML_Char
*notationName
);
247 typedef void (*XML_NotationDeclHandler
)(void *userData
,
248 const XML_Char
*notationName
,
249 const XML_Char
*base
,
250 const XML_Char
*systemId
,
251 const XML_Char
*publicId
);
253 typedef void (*XML_StartNamespaceDeclHandler
)(void *userData
,
254 const XML_Char
*prefix
,
255 const XML_Char
*uri
);
257 typedef void (*XML_EndNamespaceDeclHandler
)(void *userData
,
258 const XML_Char
*prefix
);
260 typedef int (*XML_NotStandaloneHandler
)(void *userData
);
262 typedef int (*XML_ExternalEntityRefHandler
)(XML_Parser parser
,
263 const XML_Char
*context
,
264 const XML_Char
*base
,
265 const XML_Char
*systemId
,
266 const XML_Char
*publicId
);
268 typedef void (*XML_SkippedEntityHandler
)(void *userData
,
269 const XML_Char
*entityName
,
270 int is_parameter_entity
);
272 typedef int (*XML_UnknownEncodingHandler
)(void *encodingHandlerData
,
273 const XML_Char
*name
,
276 #if defined(__GNUC__) || defined(__VBCC__)
280 #endif /* LIBRARIES_EXPAT_H */