2 * parser.h : Interfaces, constants and types related to the XML parser.
4 * See Copyright for the status of this software.
9 #ifndef __XML_PARSER_H__
10 #define __XML_PARSER_H__
12 #include <libxml/tree.h>
13 #include <libxml/valid.h>
14 #include <libxml/entities.h>
21 * XML_DEFAULT_VERSION:
23 * The default version of XML used: 1.0
25 #define XML_DEFAULT_VERSION "1.0"
30 * 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.
39 * xmlParserInputDeallocate:
40 * @str: the string to deallocate
42 * Callback for freeing some parser input allocations.
44 typedef void (* xmlParserInputDeallocate)(xmlChar *str);
46 struct _xmlParserInput {
48 xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */
50 const char *filename; /* The file analyzed, if any */
51 const char *directory; /* the directory/base of the file */
52 const xmlChar *base; /* Base of the array to parse */
53 const xmlChar *cur; /* Current char being parsed */
54 const xmlChar *end; /* end of the array to parse */
55 int length; /* length if known */
56 int line; /* Current line */
57 int col; /* Current column */
58 int consumed; /* How many xmlChars already consumed */
59 xmlParserInputDeallocate free; /* function to deallocate the base */
60 const xmlChar *encoding; /* the encoding string for entity */
61 const xmlChar *version; /* the version string for entity */
62 int standalone; /* Was that entity marked standalone */
68 * The parser can be asked to collect Node informations, i.e. at what
69 * place in the file they were detected.
70 * NOTE: This is off by default and not very well tested.
72 typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
73 typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
75 struct _xmlParserNodeInfo {
76 const struct _xmlNode* node;
77 /* Position & line # that text that created the node begins & ends on */
78 unsigned long begin_pos;
79 unsigned long begin_line;
80 unsigned long end_pos;
81 unsigned long end_line;
84 typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
85 typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
86 struct _xmlParserNodeInfoSeq {
87 unsigned long maximum;
89 xmlParserNodeInfo* buffer;
93 * xmlParserInputState:
95 * The parser is now working also as a state based parser.
96 * The recursive one use the state info for entities processing.
99 XML_PARSER_EOF = -1, /* nothing is to be parsed */
100 XML_PARSER_START = 0, /* nothing has been parsed */
101 XML_PARSER_MISC, /* Misc* before int subset */
102 XML_PARSER_PI, /* Within a processing instruction */
103 XML_PARSER_DTD, /* within some DTD content */
104 XML_PARSER_PROLOG, /* Misc* after internal subset */
105 XML_PARSER_COMMENT, /* within a comment */
106 XML_PARSER_START_TAG, /* within a start tag */
107 XML_PARSER_CONTENT, /* within the content */
108 XML_PARSER_CDATA_SECTION, /* within a CDATA section */
109 XML_PARSER_END_TAG, /* within a closing tag */
110 XML_PARSER_ENTITY_DECL, /* within an entity declaration */
111 XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */
112 XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
113 XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
114 XML_PARSER_EPILOG, /* the Misc* after the last end tag */
115 XML_PARSER_IGNORE, /* within an IGNORED section */
116 XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */
117 } xmlParserInputState;
122 * Bit in the loadsubset context field to tell to do ID/REFs lookups.
123 * Use it to initialize xmlLoadExtDtdDefaultValue.
125 #define XML_DETECT_IDS 2
128 * XML_COMPLETE_ATTRS:
130 * Bit in the loadsubset context field to tell to do complete the
131 * elements attributes lists with the ones defaulted from the DTDs.
132 * Use it to initialize xmlLoadExtDtdDefaultValue.
134 #define XML_COMPLETE_ATTRS 4
139 * The parser context.
140 * NOTE This doesn't completely define the parser state, the (current ?)
141 * design of the parser uses recursive function calls since this allow
142 * and easy mapping from the production rules of the specification
143 * to the actual code. The drawback is that the actual function call
144 * also reflect the parser state. However most of the parsing routines
145 * takes as the only argument the parser context pointer, so migrating
146 * to a state based parser for progressive parsing shouldn't be too hard.
148 struct _xmlParserCtxt {
149 struct _xmlSAXHandler *sax; /* The SAX handler */
150 void *userData; /* For SAX interface only, used by DOM build */
151 xmlDocPtr myDoc; /* the document being built */
152 int wellFormed; /* is the document well formed */
153 int replaceEntities; /* shall we replace entities ? */
154 const xmlChar *version; /* the XML version string */
155 const xmlChar *encoding; /* the declared encoding, if any */
156 int standalone; /* standalone document */
157 int html; /* an HTML(1)/Docbook(2) document */
159 /* Input stream stack */
160 xmlParserInputPtr input; /* Current input stream */
161 int inputNr; /* Number of current input streams */
162 int inputMax; /* Max number of input streams */
163 xmlParserInputPtr *inputTab; /* stack of inputs */
165 /* Node analysis stack only used for DOM building */
166 xmlNodePtr node; /* Current parsed Node */
167 int nodeNr; /* Depth of the parsing stack */
168 int nodeMax; /* Max depth of the parsing stack */
169 xmlNodePtr *nodeTab; /* array of nodes */
171 int record_info; /* Whether node info should be kept */
172 xmlParserNodeInfoSeq node_seq; /* info about each node parsed */
174 int errNo; /* error code */
176 int hasExternalSubset; /* reference and external subset */
177 int hasPErefs; /* the internal subset has PE refs */
178 int external; /* are we parsing an external entity */
180 int valid; /* is the document valid */
181 int validate; /* shall we try to validate ? */
182 xmlValidCtxt vctxt; /* The validity context */
184 xmlParserInputState instate; /* current type of input */
185 int token; /* next char look-ahead */
187 char *directory; /* the data directory */
189 /* Node name stack */
190 xmlChar *name; /* Current parsed Node */
191 int nameNr; /* Depth of the parsing stack */
192 int nameMax; /* Max depth of the parsing stack */
193 xmlChar * *nameTab; /* array of nodes */
195 long nbChars; /* number of xmlChar processed */
196 long checkIndex; /* used by progressive parsing lookup */
197 int keepBlanks; /* ugly but ... */
198 int disableSAX; /* SAX callbacks are disabled */
199 int inSubset; /* Parsing is in int 1/ext 2 subset */
200 xmlChar * intSubName; /* name of subset */
201 xmlChar * extSubURI; /* URI of external subset */
202 xmlChar * extSubSystem; /* SYSTEM ID of external subset */
204 /* xml:space values */
205 int * space; /* Should the parser preserve spaces */
206 int spaceNr; /* Depth of the parsing stack */
207 int spaceMax; /* Max depth of the parsing stack */
208 int * spaceTab; /* array of space infos */
210 int depth; /* to prevent entity substitution loops */
211 xmlParserInputPtr entity; /* used to check entities boundaries */
212 int charset; /* encoding of the in-memory content
213 actually an xmlCharEncoding */
214 int nodelen; /* Those two fields are there to */
215 int nodemem; /* Speed up large node parsing */
216 int pedantic; /* signal pedantic warnings */
217 void *_private; /* For user data, libxml won't touch it */
219 int loadsubset; /* should the external subset be loaded */
220 int linenumbers; /* set line number in element content */
221 void *catalogs; /* document's own catalog */
222 int recovery; /* run in recovery mode */
230 struct _xmlSAXLocator {
231 const xmlChar *(*getPublicId)(void *ctx);
232 const xmlChar *(*getSystemId)(void *ctx);
233 int (*getLineNumber)(void *ctx);
234 int (*getColumnNumber)(void *ctx);
240 * A SAX handler is bunch of callbacks called by the parser when processing
241 * of the input generate data or structure informations.
245 * resolveEntitySAXFunc:
246 * @ctx: the user data (XML parser context)
247 * @publicId: The public ID of the entity
248 * @systemId: The system ID of the entity
251 * The entity loader, to control the loading of external entities,
252 * the application can either:
253 * - override this resolveEntity() callback in the SAX block
254 * - or better use the xmlSetExternalEntityLoader() function to
255 * set up it's own entity resolution routine
257 * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
259 typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
260 const xmlChar *publicId,
261 const xmlChar *systemId);
263 * internalSubsetSAXFunc:
264 * @ctx: the user data (XML parser context)
265 * @name: the root element name
266 * @ExternalID: the external ID
267 * @SystemID: the SYSTEM ID (e.g. filename or URL)
269 * Callback on internal subset declaration.
271 typedef void (*internalSubsetSAXFunc) (void *ctx,
273 const xmlChar *ExternalID,
274 const xmlChar *SystemID);
276 * externalSubsetSAXFunc:
277 * @ctx: the user data (XML parser context)
278 * @name: the root element name
279 * @ExternalID: the external ID
280 * @SystemID: the SYSTEM ID (e.g. filename or URL)
282 * Callback on external subset declaration.
284 typedef void (*externalSubsetSAXFunc) (void *ctx,
286 const xmlChar *ExternalID,
287 const xmlChar *SystemID);
290 * @ctx: the user data (XML parser context)
291 * @name: The entity name
293 * Get an entity by name.
295 * Returns the xmlEntityPtr if found.
297 typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
298 const xmlChar *name);
300 * getParameterEntitySAXFunc:
301 * @ctx: the user data (XML parser context)
302 * @name: The entity name
304 * Get a parameter entity by name.
306 * Returns the xmlEntityPtr if found.
308 typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
309 const xmlChar *name);
312 * @ctx: the user data (XML parser context)
313 * @name: the entity name
314 * @type: the entity type
315 * @publicId: The public ID of the entity
316 * @systemId: The system ID of the entity
317 * @content: the entity value (without processing).
319 * An entity definition has been parsed.
321 typedef void (*entityDeclSAXFunc) (void *ctx,
324 const xmlChar *publicId,
325 const xmlChar *systemId,
328 * notationDeclSAXFunc:
329 * @ctx: the user data (XML parser context)
330 * @name: The name of the notation
331 * @publicId: The public ID of the entity
332 * @systemId: The system ID of the entity
334 * What to do when a notation declaration has been parsed.
336 typedef void (*notationDeclSAXFunc)(void *ctx,
338 const xmlChar *publicId,
339 const xmlChar *systemId);
341 * attributeDeclSAXFunc:
342 * @ctx: the user data (XML parser context)
343 * @elem: the name of the element
344 * @fullname: the attribute name
345 * @type: the attribute type
346 * @def: the type of default value
347 * @defaultValue: the attribute default value
348 * @tree: the tree of enumerated value set
350 * An attribute definition has been parsed.
352 typedef void (*attributeDeclSAXFunc)(void *ctx,
354 const xmlChar *fullname,
357 const xmlChar *defaultValue,
358 xmlEnumerationPtr tree);
360 * elementDeclSAXFunc:
361 * @ctx: the user data (XML parser context)
362 * @name: the element name
363 * @type: the element type
364 * @content: the element value tree
366 * An element definition has been parsed.
368 typedef void (*elementDeclSAXFunc)(void *ctx,
371 xmlElementContentPtr content);
373 * unparsedEntityDeclSAXFunc:
374 * @ctx: the user data (XML parser context)
375 * @name: The name of the entity
376 * @publicId: The public ID of the entity
377 * @systemId: The system ID of the entity
378 * @notationName: the name of the notation
380 * What to do when an unparsed entity declaration is parsed.
382 typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
384 const xmlChar *publicId,
385 const xmlChar *systemId,
386 const xmlChar *notationName);
388 * setDocumentLocatorSAXFunc:
389 * @ctx: the user data (XML parser context)
390 * @loc: A SAX Locator
392 * Receive the document locator at startup, actually xmlDefaultSAXLocator.
393 * Everything is available on the context, so this is useless in our case.
395 typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
396 xmlSAXLocatorPtr loc);
398 * startDocumentSAXFunc:
399 * @ctx: the user data (XML parser context)
401 * Called when the document start being processed.
403 typedef void (*startDocumentSAXFunc) (void *ctx);
405 * endDocumentSAXFunc:
406 * @ctx: the user data (XML parser context)
408 * Called when the document end has been detected.
410 typedef void (*endDocumentSAXFunc) (void *ctx);
412 * startElementSAXFunc:
413 * @ctx: the user data (XML parser context)
414 * @name: The element name, including namespace prefix
415 * @atts: An array of name/value attributes pairs, NULL terminated
417 * Called when an opening tag has been processed.
419 typedef void (*startElementSAXFunc) (void *ctx,
421 const xmlChar **atts);
424 * @ctx: the user data (XML parser context)
425 * @name: The element name
427 * Called when the end of an element has been detected.
429 typedef void (*endElementSAXFunc) (void *ctx,
430 const xmlChar *name);
433 * @ctx: the user data (XML parser context)
434 * @name: The attribute name, including namespace prefix
435 * @value: The attribute value
437 * Handle an attribute that has been read by the parser.
438 * The default handling is to convert the attribute into an
439 * DOM subtree and past it in a new xmlAttr element added to
442 typedef void (*attributeSAXFunc) (void *ctx,
444 const xmlChar *value);
447 * @ctx: the user data (XML parser context)
448 * @name: The entity name
450 * Called when an entity reference is detected.
452 typedef void (*referenceSAXFunc) (void *ctx,
453 const xmlChar *name);
456 * @ctx: the user data (XML parser context)
457 * @ch: a xmlChar string
458 * @len: the number of xmlChar
460 * Receiving some chars from the parser.
462 typedef void (*charactersSAXFunc) (void *ctx,
466 * ignorableWhitespaceSAXFunc:
467 * @ctx: the user data (XML parser context)
468 * @ch: a xmlChar string
469 * @len: the number of xmlChar
471 * Receiving some ignorable whitespaces from the parser.
472 * UNUSED: by default the DOM building will use characters.
474 typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
478 * processingInstructionSAXFunc:
479 * @ctx: the user data (XML parser context)
480 * @target: the target name
481 * @data: the PI data's
483 * A processing instruction has been parsed.
485 typedef void (*processingInstructionSAXFunc) (void *ctx,
486 const xmlChar *target,
487 const xmlChar *data);
490 * @ctx: the user data (XML parser context)
491 * @value: the comment content
493 * A comment has been parsed.
495 typedef void (*commentSAXFunc) (void *ctx,
496 const xmlChar *value);
499 * @ctx: the user data (XML parser context)
500 * @value: The pcdata content
501 * @len: the block length
503 * Called when a pcdata block has been parsed.
505 typedef void (*cdataBlockSAXFunc) (
507 const xmlChar *value,
511 * @ctx: an XML parser context
512 * @msg: the message to display/transmit
513 * @...: extra parameters for the message display
515 * Display and format a warning messages, callback.
517 typedef void (*warningSAXFunc) (void *ctx,
518 const char *msg, ...);
521 * @ctx: an XML parser context
522 * @msg: the message to display/transmit
523 * @...: extra parameters for the message display
525 * Display and format an error messages, callback.
527 typedef void (*errorSAXFunc) (void *ctx,
528 const char *msg, ...);
531 * @ctx: an XML parser context
532 * @msg: the message to display/transmit
533 * @...: extra parameters for the message display
535 * Display and format fatal error messages, callback.
536 * Note: so far fatalError() SAX callbacks are not used, error()
537 * get all the callbacks for errors.
539 typedef void (*fatalErrorSAXFunc) (void *ctx,
540 const char *msg, ...);
542 * isStandaloneSAXFunc:
543 * @ctx: the user data (XML parser context)
545 * Is this document tagged standalone?
549 typedef int (*isStandaloneSAXFunc) (void *ctx);
551 * hasInternalSubsetSAXFunc:
552 * @ctx: the user data (XML parser context)
554 * Does this document has an internal subset.
558 typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
560 * hasExternalSubsetSAXFunc:
561 * @ctx: the user data (XML parser context)
563 * Does this document has an external subset?
567 typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
569 struct _xmlSAXHandler {
570 internalSubsetSAXFunc internalSubset;
571 isStandaloneSAXFunc isStandalone;
572 hasInternalSubsetSAXFunc hasInternalSubset;
573 hasExternalSubsetSAXFunc hasExternalSubset;
574 resolveEntitySAXFunc resolveEntity;
575 getEntitySAXFunc getEntity;
576 entityDeclSAXFunc entityDecl;
577 notationDeclSAXFunc notationDecl;
578 attributeDeclSAXFunc attributeDecl;
579 elementDeclSAXFunc elementDecl;
580 unparsedEntityDeclSAXFunc unparsedEntityDecl;
581 setDocumentLocatorSAXFunc setDocumentLocator;
582 startDocumentSAXFunc startDocument;
583 endDocumentSAXFunc endDocument;
584 startElementSAXFunc startElement;
585 endElementSAXFunc endElement;
586 referenceSAXFunc reference;
587 charactersSAXFunc characters;
588 ignorableWhitespaceSAXFunc ignorableWhitespace;
589 processingInstructionSAXFunc processingInstruction;
590 commentSAXFunc comment;
591 warningSAXFunc warning;
593 fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
594 getParameterEntitySAXFunc getParameterEntity;
595 cdataBlockSAXFunc cdataBlock;
596 externalSubsetSAXFunc externalSubset;
601 * xmlExternalEntityLoader:
602 * @URL: The System ID of the resource requested
603 * @ID: The Public ID of the resource requested
604 * @context: the XML parser context
606 * External entity loaders types.
608 * Returns the entity input parser.
610 typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
612 xmlParserCtxtPtr context);
615 * Global variables: just the default SAX interface tables and XML
619 LIBXML_DLL_IMPORT extern const char *xmlParserVersion;
623 LIBXML_DLL_IMPORT extern xmlSAXLocator xmlDefaultSAXLocator;
624 LIBXML_DLL_IMPORT extern xmlSAXHandler xmlDefaultSAXHandler;
625 LIBXML_DLL_IMPORT extern xmlSAXHandler htmlDefaultSAXHandler;
626 LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler;
630 * Entity substitution default behavior.
634 LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultValue;
635 LIBXML_DLL_IMPORT extern int xmlGetWarningsDefaultValue;
641 #include <libxml/encoding.h>
642 #include <libxml/xmlIO.h>
643 #include <libxml/globals.h>
652 void xmlInitParser (void);
653 void xmlCleanupParser (void);
658 int xmlParserInputRead (xmlParserInputPtr in,
660 int xmlParserInputGrow (xmlParserInputPtr in,
666 xmlChar * xmlStrdup (const xmlChar *cur);
667 xmlChar * xmlStrndup (const xmlChar *cur,
669 xmlChar * xmlCharStrndup (const char *cur,
671 xmlChar * xmlCharStrdup (const char *cur);
672 xmlChar * xmlStrsub (const xmlChar *str,
675 const xmlChar * xmlStrchr (const xmlChar *str,
677 const xmlChar * xmlStrstr (const xmlChar *str,
679 const xmlChar * xmlStrcasestr (const xmlChar *str,
681 int xmlStrcmp (const xmlChar *str1,
682 const xmlChar *str2);
683 int xmlStrncmp (const xmlChar *str1,
686 int xmlStrcasecmp (const xmlChar *str1,
687 const xmlChar *str2);
688 int xmlStrncasecmp (const xmlChar *str1,
691 int xmlStrEqual (const xmlChar *str1,
692 const xmlChar *str2);
693 int xmlStrlen (const xmlChar *str);
694 xmlChar * xmlStrcat (xmlChar *cur,
696 xmlChar * xmlStrncat (xmlChar *cur,
701 * Basic parsing Interfaces
703 xmlDocPtr xmlParseDoc (xmlChar *cur);
704 xmlDocPtr xmlParseMemory (const char *buffer,
706 xmlDocPtr xmlParseFile (const char *filename);
707 int xmlSubstituteEntitiesDefault(int val);
708 int xmlKeepBlanksDefault (int val);
709 void xmlStopParser (xmlParserCtxtPtr ctxt);
710 int xmlPedanticParserDefault(int val);
711 int xmlLineNumbersDefault (int val);
716 xmlDocPtr xmlRecoverDoc (xmlChar *cur);
717 xmlDocPtr xmlRecoverMemory (const char *buffer,
719 xmlDocPtr xmlRecoverFile (const char *filename);
722 * Less common routines and SAX interfaces
724 int xmlParseDocument (xmlParserCtxtPtr ctxt);
725 int xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
726 xmlDocPtr xmlSAXParseDoc (xmlSAXHandlerPtr sax,
729 int xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
731 const char *filename);
732 int xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
736 xmlDocPtr xmlSAXParseMemory (xmlSAXHandlerPtr sax,
740 xmlDocPtr xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
745 xmlDocPtr xmlSAXParseFile (xmlSAXHandlerPtr sax,
746 const char *filename,
748 xmlDocPtr xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
749 const char *filename,
752 xmlDocPtr xmlSAXParseEntity (xmlSAXHandlerPtr sax,
753 const char *filename);
754 xmlDocPtr xmlParseEntity (const char *filename);
755 xmlDtdPtr xmlParseDTD (const xmlChar *ExternalID,
756 const xmlChar *SystemID);
757 xmlDtdPtr xmlSAXParseDTD (xmlSAXHandlerPtr sax,
758 const xmlChar *ExternalID,
759 const xmlChar *SystemID);
760 xmlDtdPtr xmlIOParseDTD (xmlSAXHandlerPtr sax,
761 xmlParserInputBufferPtr input,
762 xmlCharEncoding enc);
763 int xmlParseBalancedChunkMemory(xmlDocPtr doc,
764 xmlSAXHandlerPtr sax,
767 const xmlChar *string,
769 int xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
770 xmlSAXHandlerPtr sax,
773 const xmlChar *string,
776 int xmlParseExternalEntity (xmlDocPtr doc,
777 xmlSAXHandlerPtr sax,
783 int xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
789 * Parser contexts handling.
791 void xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
792 void xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
793 void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
794 void xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
795 const xmlChar* buffer,
796 const char *filename);
797 xmlParserCtxtPtr xmlCreateDocParserCtxt (xmlChar *cur);
800 * Reading/setting optional parsing features.
803 int xmlGetFeaturesList (int *len,
804 const char **result);
805 int xmlGetFeature (xmlParserCtxtPtr ctxt,
808 int xmlSetFeature (xmlParserCtxtPtr ctxt,
813 * Interfaces for the Push mode.
815 xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
819 const char *filename);
820 int xmlParseChunk (xmlParserCtxtPtr ctxt,
829 xmlParserCtxtPtr xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
831 xmlInputReadCallback ioread,
832 xmlInputCloseCallback ioclose,
834 xmlCharEncoding enc);
836 xmlParserInputPtr xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
837 xmlParserInputBufferPtr input,
838 xmlCharEncoding enc);
843 const xmlParserNodeInfo*
844 xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt,
845 const xmlNodePtr node);
846 void xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
847 void xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
848 unsigned long xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
849 const xmlNodePtr node);
850 void xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
851 const xmlParserNodeInfoPtr info);
854 * External entities handling actually implemented in xmlIO.
857 void xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
858 xmlExternalEntityLoader
859 xmlGetExternalEntityLoader(void);
861 xmlLoadExternalEntity (const char *URL,
863 xmlParserCtxtPtr ctxt);
868 #endif /* __XML_PARSER_H__ */