blob: a8f06373528eb896102e345bd9748410faa43615 [file] [log] [blame]
Owen Taylor3473f882001-02-23 17:55:21 +00001/*
2 * parser.h : Interfaces, constants and types related to the XML parser.
3 *
4 * See Copyright for the status of this software.
5 *
6 * Daniel.Veillard@w3.org
7 */
8
9#ifndef __XML_PARSER_H__
10#define __XML_PARSER_H__
11
12#include <libxml/tree.h>
13#include <libxml/valid.h>
14#include <libxml/xmlIO.h>
15#include <libxml/entities.h>
16
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22/*
23 * Constants.
24 */
25#define XML_DEFAULT_VERSION "1.0"
26
27/**
Daniel Veillardf69bb4b2001-05-19 13:24:56 +000028 * xmlParserInput:
29 *
Owen Taylor3473f882001-02-23 17:55:21 +000030 * an xmlParserInput is an input flow for the XML processor.
31 * Each entity parsed is associated an xmlParserInput (except the
32 * few predefined ones). This is the case both for internal entities
33 * - in which case the flow is already completely in memory - or
34 * external entities - in which case we use the buf structure for
35 * progressive reading and I18N conversions to the internal UTF-8 format.
36 */
37
38typedef void (* xmlParserInputDeallocate)(xmlChar *);
39typedef struct _xmlParserInput xmlParserInput;
40typedef xmlParserInput *xmlParserInputPtr;
41struct _xmlParserInput {
42 /* Input buffer */
43 xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */
44
45 const char *filename; /* The file analyzed, if any */
46 const char *directory; /* the directory/base of teh file */
47 const xmlChar *base; /* Base of the array to parse */
48 const xmlChar *cur; /* Current char being parsed */
Daniel Veillard48b2f892001-02-25 16:11:03 +000049 const xmlChar *end; /* end of the arry to parse */
Owen Taylor3473f882001-02-23 17:55:21 +000050 int length; /* length if known */
51 int line; /* Current line */
52 int col; /* Current column */
53 int consumed; /* How many xmlChars already consumed */
54 xmlParserInputDeallocate free; /* function to deallocate the base */
55 const xmlChar *encoding; /* the encoding string for entity */
56 const xmlChar *version; /* the version string for entity */
57 int standalone; /* Was that entity marked standalone */
58};
59
60/**
Daniel Veillardf69bb4b2001-05-19 13:24:56 +000061 * xmlParserNodeInfo:
62 *
Owen Taylor3473f882001-02-23 17:55:21 +000063 * the parser can be asked to collect Node informations, i.e. at what
64 * place in the file they were detected.
65 * NOTE: This is off by default and not very well tested.
66 */
67typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
68typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
69
70struct _xmlParserNodeInfo {
71 const struct _xmlNode* node;
72 /* Position & line # that text that created the node begins & ends on */
73 unsigned long begin_pos;
74 unsigned long begin_line;
75 unsigned long end_pos;
76 unsigned long end_line;
77};
78
79typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
80typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
81struct _xmlParserNodeInfoSeq {
82 unsigned long maximum;
83 unsigned long length;
84 xmlParserNodeInfo* buffer;
85};
86
87/**
Daniel Veillardf69bb4b2001-05-19 13:24:56 +000088 * xmlParserInputState:
89 *
Owen Taylor3473f882001-02-23 17:55:21 +000090 * The parser is now working also as a state based parser
91 * The recursive one use the stagte info for entities processing
92 */
93typedef enum {
94 XML_PARSER_EOF = -1, /* nothing is to be parsed */
95 XML_PARSER_START = 0, /* nothing has been parsed */
96 XML_PARSER_MISC, /* Misc* before int subset */
97 XML_PARSER_PI, /* Whithin a processing instruction */
98 XML_PARSER_DTD, /* within some DTD content */
99 XML_PARSER_PROLOG, /* Misc* after internal subset */
100 XML_PARSER_COMMENT, /* within a comment */
101 XML_PARSER_START_TAG, /* within a start tag */
102 XML_PARSER_CONTENT, /* within the content */
103 XML_PARSER_CDATA_SECTION, /* within a CDATA section */
104 XML_PARSER_END_TAG, /* within a closing tag */
105 XML_PARSER_ENTITY_DECL, /* within an entity declaration */
106 XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */
107 XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
108 XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
109 XML_PARSER_EPILOG, /* the Misc* after the last end tag */
110 XML_PARSER_IGNORE /* within an IGNORED section */
111} xmlParserInputState;
112
113/**
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000114 * xmlParserCtxt:
115 *
Owen Taylor3473f882001-02-23 17:55:21 +0000116 * The parser context.
117 * NOTE This doesn't completely defines the parser state, the (current ?)
118 * design of the parser uses recursive function calls since this allow
119 * and easy mapping from the production rules of the specification
120 * to the actual code. The drawback is that the actual function call
121 * also reflect the parser state. However most of the parsing routines
122 * takes as the only argument the parser context pointer, so migrating
123 * to a state based parser for progressive parsing shouldn't be too hard.
124 */
125typedef struct _xmlParserCtxt xmlParserCtxt;
126typedef xmlParserCtxt *xmlParserCtxtPtr;
127struct _xmlParserCtxt {
128 struct _xmlSAXHandler *sax; /* The SAX handler */
129 void *userData; /* For SAX interface only, used by DOM build */
130 xmlDocPtr myDoc; /* the document being built */
131 int wellFormed; /* is the document well formed */
132 int replaceEntities; /* shall we replace entities ? */
133 const xmlChar *version; /* the XML version string */
134 const xmlChar *encoding; /* the declared encoding, if any */
135 int standalone; /* standalone document */
136 int html; /* an HTML(1)/Docbook(2) document */
137
138 /* Input stream stack */
139 xmlParserInputPtr input; /* Current input stream */
140 int inputNr; /* Number of current input streams */
141 int inputMax; /* Max number of input streams */
142 xmlParserInputPtr *inputTab; /* stack of inputs */
143
144 /* Node analysis stack only used for DOM building */
145 xmlNodePtr node; /* Current parsed Node */
146 int nodeNr; /* Depth of the parsing stack */
147 int nodeMax; /* Max depth of the parsing stack */
148 xmlNodePtr *nodeTab; /* array of nodes */
149
150 int record_info; /* Whether node info should be kept */
151 xmlParserNodeInfoSeq node_seq; /* info about each node parsed */
152
153 int errNo; /* error code */
154
155 int hasExternalSubset; /* reference and external subset */
156 int hasPErefs; /* the internal subset has PE refs */
157 int external; /* are we parsing an external entity */
158
159 int valid; /* is the document valid */
160 int validate; /* shall we try to validate ? */
161 xmlValidCtxt vctxt; /* The validity context */
162
163 xmlParserInputState instate; /* current type of input */
164 int token; /* next char look-ahead */
165
166 char *directory; /* the data directory */
167
168 /* Node name stack */
169 xmlChar *name; /* Current parsed Node */
170 int nameNr; /* Depth of the parsing stack */
171 int nameMax; /* Max depth of the parsing stack */
172 xmlChar * *nameTab; /* array of nodes */
173
174 long nbChars; /* number of xmlChar processed */
175 long checkIndex; /* used by progressive parsing lookup */
176 int keepBlanks; /* ugly but ... */
177 int disableSAX; /* SAX callbacks are disabled */
178 int inSubset; /* Parsing is in int 1/ext 2 subset */
179 xmlChar * intSubName; /* name of subset */
180 xmlChar * extSubURI; /* URI of external subset */
181 xmlChar * extSubSystem; /* SYSTEM ID of external subset */
182
183 /* xml:space values */
184 int * space; /* Should the parser preserve spaces */
185 int spaceNr; /* Depth of the parsing stack */
186 int spaceMax; /* Max depth of the parsing stack */
187 int * spaceTab; /* array of space infos */
188
189 int depth; /* to prevent entity substitution loops */
190 xmlParserInputPtr entity; /* used to check entities boundaries */
191 int charset; /* encoding of the in-memory content
192 actually an xmlCharEncoding */
193 int nodelen; /* Those two fields are there to */
194 int nodemem; /* Speed up large node parsing */
195 int pedantic; /* signal pedantic warnings */
196 void *_private; /* For user data, libxml won't touch it */
197
198 int loadsubset; /* should the external subset be loaded */
199};
200
201/**
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000202 * xmlSAXLocator:
203 *
Owen Taylor3473f882001-02-23 17:55:21 +0000204 * a SAX Locator.
205 */
206typedef struct _xmlSAXLocator xmlSAXLocator;
207typedef xmlSAXLocator *xmlSAXLocatorPtr;
208struct _xmlSAXLocator {
209 const xmlChar *(*getPublicId)(void *ctx);
210 const xmlChar *(*getSystemId)(void *ctx);
211 int (*getLineNumber)(void *ctx);
212 int (*getColumnNumber)(void *ctx);
213};
214
215/**
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000216 * xmlSAXHandler:
217 *
Owen Taylor3473f882001-02-23 17:55:21 +0000218 * a SAX handler is bunch of callbacks called by the parser when processing
219 * of the input generate data or structure informations.
220 */
221
222typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
223 const xmlChar *publicId, const xmlChar *systemId);
224typedef void (*internalSubsetSAXFunc) (void *ctx, const xmlChar *name,
225 const xmlChar *ExternalID, const xmlChar *SystemID);
226typedef void (*externalSubsetSAXFunc) (void *ctx, const xmlChar *name,
227 const xmlChar *ExternalID, const xmlChar *SystemID);
228typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
229 const xmlChar *name);
230typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
231 const xmlChar *name);
232typedef void (*entityDeclSAXFunc) (void *ctx,
233 const xmlChar *name, int type, const xmlChar *publicId,
234 const xmlChar *systemId, xmlChar *content);
235typedef void (*notationDeclSAXFunc)(void *ctx, const xmlChar *name,
236 const xmlChar *publicId, const xmlChar *systemId);
237typedef void (*attributeDeclSAXFunc)(void *ctx, const xmlChar *elem,
238 const xmlChar *name, int type, int def,
239 const xmlChar *defaultValue, xmlEnumerationPtr tree);
240typedef void (*elementDeclSAXFunc)(void *ctx, const xmlChar *name,
241 int type, xmlElementContentPtr content);
242typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
243 const xmlChar *name, const xmlChar *publicId,
244 const xmlChar *systemId, const xmlChar *notationName);
245typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
246 xmlSAXLocatorPtr loc);
247typedef void (*startDocumentSAXFunc) (void *ctx);
248typedef void (*endDocumentSAXFunc) (void *ctx);
249typedef void (*startElementSAXFunc) (void *ctx, const xmlChar *name,
250 const xmlChar **atts);
251typedef void (*endElementSAXFunc) (void *ctx, const xmlChar *name);
252typedef void (*attributeSAXFunc) (void *ctx, const xmlChar *name,
253 const xmlChar *value);
254typedef void (*referenceSAXFunc) (void *ctx, const xmlChar *name);
255typedef void (*charactersSAXFunc) (void *ctx, const xmlChar *ch,
256 int len);
257typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
258 const xmlChar *ch, int len);
259typedef void (*processingInstructionSAXFunc) (void *ctx,
260 const xmlChar *target, const xmlChar *data);
261typedef void (*commentSAXFunc) (void *ctx, const xmlChar *value);
262typedef void (*cdataBlockSAXFunc) (void *ctx, const xmlChar *value, int len);
263typedef void (*warningSAXFunc) (void *ctx, const char *msg, ...);
264typedef void (*errorSAXFunc) (void *ctx, const char *msg, ...);
265typedef void (*fatalErrorSAXFunc) (void *ctx, const char *msg, ...);
266typedef int (*isStandaloneSAXFunc) (void *ctx);
267typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
268typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
269
270typedef struct _xmlSAXHandler xmlSAXHandler;
271typedef xmlSAXHandler *xmlSAXHandlerPtr;
272struct _xmlSAXHandler {
273 internalSubsetSAXFunc internalSubset;
274 isStandaloneSAXFunc isStandalone;
275 hasInternalSubsetSAXFunc hasInternalSubset;
276 hasExternalSubsetSAXFunc hasExternalSubset;
277 resolveEntitySAXFunc resolveEntity;
278 getEntitySAXFunc getEntity;
279 entityDeclSAXFunc entityDecl;
280 notationDeclSAXFunc notationDecl;
281 attributeDeclSAXFunc attributeDecl;
282 elementDeclSAXFunc elementDecl;
283 unparsedEntityDeclSAXFunc unparsedEntityDecl;
284 setDocumentLocatorSAXFunc setDocumentLocator;
285 startDocumentSAXFunc startDocument;
286 endDocumentSAXFunc endDocument;
287 startElementSAXFunc startElement;
288 endElementSAXFunc endElement;
289 referenceSAXFunc reference;
290 charactersSAXFunc characters;
291 ignorableWhitespaceSAXFunc ignorableWhitespace;
292 processingInstructionSAXFunc processingInstruction;
293 commentSAXFunc comment;
294 warningSAXFunc warning;
295 errorSAXFunc error;
296 fatalErrorSAXFunc fatalError;
297 getParameterEntitySAXFunc getParameterEntity;
298 cdataBlockSAXFunc cdataBlock;
299 externalSubsetSAXFunc externalSubset;
300};
301
302/**
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000303 * xmlExternalEntityLoader:
304 * @URL: The System ID of the resource requested
305 * @ID: The Public ID of the resource requested
306 * @xmlParserCtxtPtr: the XML parser context
307 *
Owen Taylor3473f882001-02-23 17:55:21 +0000308 * External entity loaders types
309 */
310typedef xmlParserInputPtr (*xmlExternalEntityLoader)(const char *URL,
311 const char *ID,
312 xmlParserCtxtPtr context);
313
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000314/*
Owen Taylor3473f882001-02-23 17:55:21 +0000315 * Global variables: just the default SAX interface tables and XML
316 * version infos.
317 */
318LIBXML_DLL_IMPORT extern const char *xmlParserVersion;
319
320LIBXML_DLL_IMPORT extern xmlSAXLocator xmlDefaultSAXLocator;
321LIBXML_DLL_IMPORT extern xmlSAXHandler xmlDefaultSAXHandler;
322LIBXML_DLL_IMPORT extern xmlSAXHandler htmlDefaultSAXHandler;
Daniel Veillardeae522a2001-04-23 13:41:34 +0000323LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler;
Owen Taylor3473f882001-02-23 17:55:21 +0000324
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000325/*
Owen Taylor3473f882001-02-23 17:55:21 +0000326 * entity substitution default behaviour.
327 */
328
329#ifdef VMS
330LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultVal;
331#define xmlSubstituteEntitiesDefaultValue xmlSubstituteEntitiesDefaultVal
332#else
333LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultValue;
334#endif
335LIBXML_DLL_IMPORT extern int xmlGetWarningsDefaultValue;
336
337
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000338/*
Owen Taylor3473f882001-02-23 17:55:21 +0000339 * Init/Cleanup
340 */
341void xmlInitParser (void);
342void xmlCleanupParser (void);
343
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000344/*
Owen Taylor3473f882001-02-23 17:55:21 +0000345 * Input functions
346 */
347int xmlParserInputRead (xmlParserInputPtr in,
348 int len);
349int xmlParserInputGrow (xmlParserInputPtr in,
350 int len);
351
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000352/*
Owen Taylor3473f882001-02-23 17:55:21 +0000353 * xmlChar handling
354 */
355xmlChar * xmlStrdup (const xmlChar *cur);
356xmlChar * xmlStrndup (const xmlChar *cur,
357 int len);
Daniel Veillard56a4cb82001-03-24 17:00:36 +0000358xmlChar * xmlCharStrndup (const char *cur,
359 int len);
360xmlChar * xmlCharStrdup (const char *cur);
Owen Taylor3473f882001-02-23 17:55:21 +0000361xmlChar * xmlStrsub (const xmlChar *str,
362 int start,
363 int len);
364const xmlChar * xmlStrchr (const xmlChar *str,
365 xmlChar val);
366const xmlChar * xmlStrstr (const xmlChar *str,
367 xmlChar *val);
368const xmlChar * xmlStrcasestr (const xmlChar *str,
369 xmlChar *val);
370int xmlStrcmp (const xmlChar *str1,
371 const xmlChar *str2);
372int xmlStrncmp (const xmlChar *str1,
373 const xmlChar *str2,
374 int len);
375int xmlStrcasecmp (const xmlChar *str1,
376 const xmlChar *str2);
377int xmlStrncasecmp (const xmlChar *str1,
378 const xmlChar *str2,
379 int len);
380int xmlStrEqual (const xmlChar *str1,
381 const xmlChar *str2);
382int xmlStrlen (const xmlChar *str);
383xmlChar * xmlStrcat (xmlChar *cur,
384 const xmlChar *add);
385xmlChar * xmlStrncat (xmlChar *cur,
386 const xmlChar *add,
387 int len);
388
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000389/*
Owen Taylor3473f882001-02-23 17:55:21 +0000390 * Basic parsing Interfaces
391 */
392xmlDocPtr xmlParseDoc (xmlChar *cur);
393xmlDocPtr xmlParseMemory (char *buffer,
394 int size);
395xmlDocPtr xmlParseFile (const char *filename);
396int xmlSubstituteEntitiesDefault(int val);
397int xmlKeepBlanksDefault (int val);
398void xmlStopParser (xmlParserCtxtPtr ctxt);
399int xmlPedanticParserDefault(int val);
400
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000401/*
Owen Taylor3473f882001-02-23 17:55:21 +0000402 * Recovery mode
403 */
404xmlDocPtr xmlRecoverDoc (xmlChar *cur);
405xmlDocPtr xmlRecoverMemory (char *buffer,
406 int size);
407xmlDocPtr xmlRecoverFile (const char *filename);
408
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000409/*
Owen Taylor3473f882001-02-23 17:55:21 +0000410 * Less common routines and SAX interfaces
411 */
412int xmlParseDocument (xmlParserCtxtPtr ctxt);
413int xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
414xmlDocPtr xmlSAXParseDoc (xmlSAXHandlerPtr sax,
415 xmlChar *cur,
416 int recovery);
417int xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
418 void *user_data,
419 const char *filename);
420int xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
421 void *user_data,
Daniel Veillardfd7ddca2001-05-16 10:57:35 +0000422 const char *buffer,
Owen Taylor3473f882001-02-23 17:55:21 +0000423 int size);
424xmlDocPtr xmlSAXParseMemory (xmlSAXHandlerPtr sax,
425 char *buffer,
426 int size,
427 int recovery);
428xmlDocPtr xmlSAXParseFile (xmlSAXHandlerPtr sax,
429 const char *filename,
430 int recovery);
431xmlDocPtr xmlSAXParseEntity (xmlSAXHandlerPtr sax,
432 const char *filename);
433xmlDocPtr xmlParseEntity (const char *filename);
434xmlDtdPtr xmlParseDTD (const xmlChar *ExternalID,
435 const xmlChar *SystemID);
436xmlDtdPtr xmlSAXParseDTD (xmlSAXHandlerPtr sax,
437 const xmlChar *ExternalID,
438 const xmlChar *SystemID);
439xmlDtdPtr xmlIOParseDTD (xmlSAXHandlerPtr sax,
440 xmlParserInputBufferPtr input,
441 xmlCharEncoding enc);
442int xmlParseBalancedChunkMemory(xmlDocPtr doc,
443 xmlSAXHandlerPtr sax,
444 void *user_data,
445 int depth,
446 const xmlChar *string,
447 xmlNodePtr *list);
448int xmlParseExternalEntity (xmlDocPtr doc,
449 xmlSAXHandlerPtr sax,
450 void *user_data,
451 int depth,
452 const xmlChar *URL,
453 const xmlChar *ID,
454 xmlNodePtr *list);
455int xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
456 const xmlChar *URL,
457 const xmlChar *ID,
458 xmlNodePtr *list);
459
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000460/*
Owen Taylor3473f882001-02-23 17:55:21 +0000461 * SAX initialization routines
462 */
463void xmlDefaultSAXHandlerInit(void);
464void htmlDefaultSAXHandlerInit(void);
465
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000466/*
Owen Taylor3473f882001-02-23 17:55:21 +0000467 * Parser contexts handling.
468 */
469void xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
470void xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
471void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
472void xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
473 const xmlChar* buffer,
474 const char* filename);
475xmlParserCtxtPtr xmlCreateDocParserCtxt (xmlChar *cur);
476
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000477/*
Owen Taylor3473f882001-02-23 17:55:21 +0000478 * Reading/setting optional parsing features.
479 */
480
481int xmlGetFeaturesList (int *len,
482 const char **result);
483int xmlGetFeature (xmlParserCtxtPtr ctxt,
484 const char *name,
485 void *result);
486int xmlSetFeature (xmlParserCtxtPtr ctxt,
487 const char *name,
488 void *value);
489
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000490/*
Owen Taylor3473f882001-02-23 17:55:21 +0000491 * Interfaces for the Push mode
492 */
493xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
494 void *user_data,
495 const char *chunk,
496 int size,
497 const char *filename);
498int xmlParseChunk (xmlParserCtxtPtr ctxt,
499 const char *chunk,
500 int size,
501 int terminate);
502
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000503/*
Owen Taylor3473f882001-02-23 17:55:21 +0000504 * Special I/O mode
505 */
506
507xmlParserCtxtPtr xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
508 void *user_data,
509 xmlInputReadCallback ioread,
510 xmlInputCloseCallback ioclose,
511 void *ioctx,
512 xmlCharEncoding enc);
513
514xmlParserInputPtr xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
515 xmlParserInputBufferPtr input,
516 xmlCharEncoding enc);
517
Daniel Veillardf69bb4b2001-05-19 13:24:56 +0000518/*
Owen Taylor3473f882001-02-23 17:55:21 +0000519 * Node infos
520 */
521const xmlParserNodeInfo*
522 xmlParserFindNodeInfo (const xmlParserCtxt* ctxt,
523 const xmlNode* node);
524void xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
525void xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
526unsigned long xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeq* seq,
527 const xmlNode* node);
528void xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
529 const xmlParserNodeInfo* info);
530
531/*
532 * External entities handling actually implemented in xmlIO
533 */
534
535void xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
536xmlExternalEntityLoader
537 xmlGetExternalEntityLoader(void);
538xmlParserInputPtr
539 xmlLoadExternalEntity (const char *URL,
540 const char *ID,
541 xmlParserCtxtPtr context);
542
543#ifdef __cplusplus
544}
545#endif
546
547#endif /* __XML_PARSER_H__ */
548