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 */
59 * NOTE: consumed is only tested for equality in the parser code,
60 * so even if there is an overflow this should not give troubles
61 * for parsing very large instances.
63 unsigned long consumed; /* How many xmlChars already consumed */
64 xmlParserInputDeallocate free; /* function to deallocate the base */
65 const xmlChar *encoding; /* the encoding string for entity */
66 const xmlChar *version; /* the version string for entity */
67 int standalone; /* Was that entity marked standalone */
73 * The parser can be asked to collect Node informations, i.e. at what
74 * place in the file they were detected.
75 * NOTE: This is off by default and not very well tested.
77 typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
78 typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
80 struct _xmlParserNodeInfo {
81 const struct _xmlNode* node;
82 /* Position & line # that text that created the node begins & ends on */
83 unsigned long begin_pos;
84 unsigned long begin_line;
85 unsigned long end_pos;
86 unsigned long end_line;
89 typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
90 typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
91 struct _xmlParserNodeInfoSeq {
92 unsigned long maximum;
94 xmlParserNodeInfo* buffer;
98 * xmlParserInputState:
100 * The parser is now working also as a state based parser.
101 * The recursive one use the state info for entities processing.
104 XML_PARSER_EOF = -1, /* nothing is to be parsed */
105 XML_PARSER_START = 0, /* nothing has been parsed */
106 XML_PARSER_MISC, /* Misc* before int subset */
107 XML_PARSER_PI, /* Within a processing instruction */
108 XML_PARSER_DTD, /* within some DTD content */
109 XML_PARSER_PROLOG, /* Misc* after internal subset */
110 XML_PARSER_COMMENT, /* within a comment */
111 XML_PARSER_START_TAG, /* within a start tag */
112 XML_PARSER_CONTENT, /* within the content */
113 XML_PARSER_CDATA_SECTION, /* within a CDATA section */
114 XML_PARSER_END_TAG, /* within a closing tag */
115 XML_PARSER_ENTITY_DECL, /* within an entity declaration */
116 XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */
117 XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
118 XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
119 XML_PARSER_EPILOG, /* the Misc* after the last end tag */
120 XML_PARSER_IGNORE, /* within an IGNORED section */
121 XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */
122 } xmlParserInputState;
127 * Bit in the loadsubset context field to tell to do ID/REFs lookups.
128 * Use it to initialize xmlLoadExtDtdDefaultValue.
130 #define XML_DETECT_IDS 2
133 * XML_COMPLETE_ATTRS:
135 * Bit in the loadsubset context field to tell to do complete the
136 * elements attributes lists with the ones defaulted from the DTDs.
137 * Use it to initialize xmlLoadExtDtdDefaultValue.
139 #define XML_COMPLETE_ATTRS 4
144 * Bit in the loadsubset context field to tell to not do ID/REFs registration.
145 * Used to initialize xmlLoadExtDtdDefaultValue in some special cases.
147 #define XML_SKIP_IDS 8
152 * The parser context.
153 * NOTE This doesn't completely define the parser state, the (current ?)
154 * design of the parser uses recursive function calls since this allow
155 * and easy mapping from the production rules of the specification
156 * to the actual code. The drawback is that the actual function call
157 * also reflect the parser state. However most of the parsing routines
158 * takes as the only argument the parser context pointer, so migrating
159 * to a state based parser for progressive parsing shouldn't be too hard.
161 struct _xmlParserCtxt {
162 struct _xmlSAXHandler *sax; /* The SAX handler */
163 void *userData; /* For SAX interface only, used by DOM build */
164 xmlDocPtr myDoc; /* the document being built */
165 int wellFormed; /* is the document well formed */
166 int replaceEntities; /* shall we replace entities ? */
167 const xmlChar *version; /* the XML version string */
168 const xmlChar *encoding; /* the declared encoding, if any */
169 int standalone; /* standalone document */
170 int html; /* an HTML(1)/Docbook(2) document */
172 /* Input stream stack */
173 xmlParserInputPtr input; /* Current input stream */
174 int inputNr; /* Number of current input streams */
175 int inputMax; /* Max number of input streams */
176 xmlParserInputPtr *inputTab; /* stack of inputs */
178 /* Node analysis stack only used for DOM building */
179 xmlNodePtr node; /* Current parsed Node */
180 int nodeNr; /* Depth of the parsing stack */
181 int nodeMax; /* Max depth of the parsing stack */
182 xmlNodePtr *nodeTab; /* array of nodes */
184 int record_info; /* Whether node info should be kept */
185 xmlParserNodeInfoSeq node_seq; /* info about each node parsed */
187 int errNo; /* error code */
189 int hasExternalSubset; /* reference and external subset */
190 int hasPErefs; /* the internal subset has PE refs */
191 int external; /* are we parsing an external entity */
193 int valid; /* is the document valid */
194 int validate; /* shall we try to validate ? */
195 xmlValidCtxt vctxt; /* The validity context */
197 xmlParserInputState instate; /* current type of input */
198 int token; /* next char look-ahead */
200 char *directory; /* the data directory */
202 /* Node name stack */
203 xmlChar *name; /* Current parsed Node */
204 int nameNr; /* Depth of the parsing stack */
205 int nameMax; /* Max depth of the parsing stack */
206 xmlChar * *nameTab; /* array of nodes */
208 long nbChars; /* number of xmlChar processed */
209 long checkIndex; /* used by progressive parsing lookup */
210 int keepBlanks; /* ugly but ... */
211 int disableSAX; /* SAX callbacks are disabled */
212 int inSubset; /* Parsing is in int 1/ext 2 subset */
213 xmlChar * intSubName; /* name of subset */
214 xmlChar * extSubURI; /* URI of external subset */
215 xmlChar * extSubSystem; /* SYSTEM ID of external subset */
217 /* xml:space values */
218 int * space; /* Should the parser preserve spaces */
219 int spaceNr; /* Depth of the parsing stack */
220 int spaceMax; /* Max depth of the parsing stack */
221 int * spaceTab; /* array of space infos */
223 int depth; /* to prevent entity substitution loops */
224 xmlParserInputPtr entity; /* used to check entities boundaries */
225 int charset; /* encoding of the in-memory content
226 actually an xmlCharEncoding */
227 int nodelen; /* Those two fields are there to */
228 int nodemem; /* Speed up large node parsing */
229 int pedantic; /* signal pedantic warnings */
230 void *_private; /* For user data, libxml won't touch it */
232 int loadsubset; /* should the external subset be loaded */
233 int linenumbers; /* set line number in element content */
234 void *catalogs; /* document's own catalog */
235 int recovery; /* run in recovery mode */
236 int progressive; /* is this a progressive parsing */
244 struct _xmlSAXLocator {
245 const xmlChar *(*getPublicId)(void *ctx);
246 const xmlChar *(*getSystemId)(void *ctx);
247 int (*getLineNumber)(void *ctx);
248 int (*getColumnNumber)(void *ctx);
254 * A SAX handler is bunch of callbacks called by the parser when processing
255 * of the input generate data or structure informations.
259 * resolveEntitySAXFunc:
260 * @ctx: the user data (XML parser context)
261 * @publicId: The public ID of the entity
262 * @systemId: The system ID of the entity
265 * The entity loader, to control the loading of external entities,
266 * the application can either:
267 * - override this resolveEntity() callback in the SAX block
268 * - or better use the xmlSetExternalEntityLoader() function to
269 * set up it's own entity resolution routine
271 * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
273 typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
274 const xmlChar *publicId,
275 const xmlChar *systemId);
277 * internalSubsetSAXFunc:
278 * @ctx: the user data (XML parser context)
279 * @name: the root element name
280 * @ExternalID: the external ID
281 * @SystemID: the SYSTEM ID (e.g. filename or URL)
283 * Callback on internal subset declaration.
285 typedef void (*internalSubsetSAXFunc) (void *ctx,
287 const xmlChar *ExternalID,
288 const xmlChar *SystemID);
290 * externalSubsetSAXFunc:
291 * @ctx: the user data (XML parser context)
292 * @name: the root element name
293 * @ExternalID: the external ID
294 * @SystemID: the SYSTEM ID (e.g. filename or URL)
296 * Callback on external subset declaration.
298 typedef void (*externalSubsetSAXFunc) (void *ctx,
300 const xmlChar *ExternalID,
301 const xmlChar *SystemID);
304 * @ctx: the user data (XML parser context)
305 * @name: The entity name
307 * Get an entity by name.
309 * Returns the xmlEntityPtr if found.
311 typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
312 const xmlChar *name);
314 * getParameterEntitySAXFunc:
315 * @ctx: the user data (XML parser context)
316 * @name: The entity name
318 * Get a parameter entity by name.
320 * Returns the xmlEntityPtr if found.
322 typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
323 const xmlChar *name);
326 * @ctx: the user data (XML parser context)
327 * @name: the entity name
328 * @type: the entity type
329 * @publicId: The public ID of the entity
330 * @systemId: The system ID of the entity
331 * @content: the entity value (without processing).
333 * An entity definition has been parsed.
335 typedef void (*entityDeclSAXFunc) (void *ctx,
338 const xmlChar *publicId,
339 const xmlChar *systemId,
342 * notationDeclSAXFunc:
343 * @ctx: the user data (XML parser context)
344 * @name: The name of the notation
345 * @publicId: The public ID of the entity
346 * @systemId: The system ID of the entity
348 * What to do when a notation declaration has been parsed.
350 typedef void (*notationDeclSAXFunc)(void *ctx,
352 const xmlChar *publicId,
353 const xmlChar *systemId);
355 * attributeDeclSAXFunc:
356 * @ctx: the user data (XML parser context)
357 * @elem: the name of the element
358 * @fullname: the attribute name
359 * @type: the attribute type
360 * @def: the type of default value
361 * @defaultValue: the attribute default value
362 * @tree: the tree of enumerated value set
364 * An attribute definition has been parsed.
366 typedef void (*attributeDeclSAXFunc)(void *ctx,
368 const xmlChar *fullname,
371 const xmlChar *defaultValue,
372 xmlEnumerationPtr tree);
374 * elementDeclSAXFunc:
375 * @ctx: the user data (XML parser context)
376 * @name: the element name
377 * @type: the element type
378 * @content: the element value tree
380 * An element definition has been parsed.
382 typedef void (*elementDeclSAXFunc)(void *ctx,
385 xmlElementContentPtr content);
387 * unparsedEntityDeclSAXFunc:
388 * @ctx: the user data (XML parser context)
389 * @name: The name of the entity
390 * @publicId: The public ID of the entity
391 * @systemId: The system ID of the entity
392 * @notationName: the name of the notation
394 * What to do when an unparsed entity declaration is parsed.
396 typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
398 const xmlChar *publicId,
399 const xmlChar *systemId,
400 const xmlChar *notationName);
402 * setDocumentLocatorSAXFunc:
403 * @ctx: the user data (XML parser context)
404 * @loc: A SAX Locator
406 * Receive the document locator at startup, actually xmlDefaultSAXLocator.
407 * Everything is available on the context, so this is useless in our case.
409 typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
410 xmlSAXLocatorPtr loc);
412 * startDocumentSAXFunc:
413 * @ctx: the user data (XML parser context)
415 * Called when the document start being processed.
417 typedef void (*startDocumentSAXFunc) (void *ctx);
419 * endDocumentSAXFunc:
420 * @ctx: the user data (XML parser context)
422 * Called when the document end has been detected.
424 typedef void (*endDocumentSAXFunc) (void *ctx);
426 * startElementSAXFunc:
427 * @ctx: the user data (XML parser context)
428 * @name: The element name, including namespace prefix
429 * @atts: An array of name/value attributes pairs, NULL terminated
431 * Called when an opening tag has been processed.
433 typedef void (*startElementSAXFunc) (void *ctx,
435 const xmlChar **atts);
438 * @ctx: the user data (XML parser context)
439 * @name: The element name
441 * Called when the end of an element has been detected.
443 typedef void (*endElementSAXFunc) (void *ctx,
444 const xmlChar *name);
447 * @ctx: the user data (XML parser context)
448 * @name: The attribute name, including namespace prefix
449 * @value: The attribute value
451 * Handle an attribute that has been read by the parser.
452 * The default handling is to convert the attribute into an
453 * DOM subtree and past it in a new xmlAttr element added to
456 typedef void (*attributeSAXFunc) (void *ctx,
458 const xmlChar *value);
461 * @ctx: the user data (XML parser context)
462 * @name: The entity name
464 * Called when an entity reference is detected.
466 typedef void (*referenceSAXFunc) (void *ctx,
467 const xmlChar *name);
470 * @ctx: the user data (XML parser context)
471 * @ch: a xmlChar string
472 * @len: the number of xmlChar
474 * Receiving some chars from the parser.
476 typedef void (*charactersSAXFunc) (void *ctx,
480 * ignorableWhitespaceSAXFunc:
481 * @ctx: the user data (XML parser context)
482 * @ch: a xmlChar string
483 * @len: the number of xmlChar
485 * Receiving some ignorable whitespaces from the parser.
486 * UNUSED: by default the DOM building will use characters.
488 typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
492 * processingInstructionSAXFunc:
493 * @ctx: the user data (XML parser context)
494 * @target: the target name
495 * @data: the PI data's
497 * A processing instruction has been parsed.
499 typedef void (*processingInstructionSAXFunc) (void *ctx,
500 const xmlChar *target,
501 const xmlChar *data);
504 * @ctx: the user data (XML parser context)
505 * @value: the comment content
507 * A comment has been parsed.
509 typedef void (*commentSAXFunc) (void *ctx,
510 const xmlChar *value);
513 * @ctx: the user data (XML parser context)
514 * @value: The pcdata content
515 * @len: the block length
517 * Called when a pcdata block has been parsed.
519 typedef void (*cdataBlockSAXFunc) (
521 const xmlChar *value,
525 * @ctx: an XML parser context
526 * @msg: the message to display/transmit
527 * @...: extra parameters for the message display
529 * Display and format a warning messages, callback.
531 typedef void (*warningSAXFunc) (void *ctx,
532 const char *msg, ...);
535 * @ctx: an XML parser context
536 * @msg: the message to display/transmit
537 * @...: extra parameters for the message display
539 * Display and format an error messages, callback.
541 typedef void (*errorSAXFunc) (void *ctx,
542 const char *msg, ...);
545 * @ctx: an XML parser context
546 * @msg: the message to display/transmit
547 * @...: extra parameters for the message display
549 * Display and format fatal error messages, callback.
550 * Note: so far fatalError() SAX callbacks are not used, error()
551 * get all the callbacks for errors.
553 typedef void (*fatalErrorSAXFunc) (void *ctx,
554 const char *msg, ...);
556 * isStandaloneSAXFunc:
557 * @ctx: the user data (XML parser context)
559 * Is this document tagged standalone?
563 typedef int (*isStandaloneSAXFunc) (void *ctx);
565 * hasInternalSubsetSAXFunc:
566 * @ctx: the user data (XML parser context)
568 * Does this document has an internal subset.
572 typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
574 * hasExternalSubsetSAXFunc:
575 * @ctx: the user data (XML parser context)
577 * Does this document has an external subset?
581 typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
583 struct _xmlSAXHandler {
584 internalSubsetSAXFunc internalSubset;
585 isStandaloneSAXFunc isStandalone;
586 hasInternalSubsetSAXFunc hasInternalSubset;
587 hasExternalSubsetSAXFunc hasExternalSubset;
588 resolveEntitySAXFunc resolveEntity;
589 getEntitySAXFunc getEntity;
590 entityDeclSAXFunc entityDecl;
591 notationDeclSAXFunc notationDecl;
592 attributeDeclSAXFunc attributeDecl;
593 elementDeclSAXFunc elementDecl;
594 unparsedEntityDeclSAXFunc unparsedEntityDecl;
595 setDocumentLocatorSAXFunc setDocumentLocator;
596 startDocumentSAXFunc startDocument;
597 endDocumentSAXFunc endDocument;
598 startElementSAXFunc startElement;
599 endElementSAXFunc endElement;
600 referenceSAXFunc reference;
601 charactersSAXFunc characters;
602 ignorableWhitespaceSAXFunc ignorableWhitespace;
603 processingInstructionSAXFunc processingInstruction;
604 commentSAXFunc comment;
605 warningSAXFunc warning;
607 fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
608 getParameterEntitySAXFunc getParameterEntity;
609 cdataBlockSAXFunc cdataBlock;
610 externalSubsetSAXFunc externalSubset;
615 * xmlExternalEntityLoader:
616 * @URL: The System ID of the resource requested
617 * @ID: The Public ID of the resource requested
618 * @context: the XML parser context
620 * External entity loaders types.
622 * Returns the entity input parser.
624 typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
626 xmlParserCtxtPtr context);
629 * Global variables: just the default SAX interface tables and XML
633 LIBXML_DLL_IMPORT extern const char *xmlParserVersion;
637 LIBXML_DLL_IMPORT extern xmlSAXLocator xmlDefaultSAXLocator;
638 LIBXML_DLL_IMPORT extern xmlSAXHandler xmlDefaultSAXHandler;
639 LIBXML_DLL_IMPORT extern xmlSAXHandler htmlDefaultSAXHandler;
640 LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler;
644 * Entity substitution default behavior.
648 LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultValue;
649 LIBXML_DLL_IMPORT extern int xmlGetWarningsDefaultValue;
655 #include <libxml/encoding.h>
656 #include <libxml/xmlIO.h>
657 #include <libxml/globals.h>
666 void xmlInitParser (void);
667 void xmlCleanupParser (void);
672 int xmlParserInputRead (xmlParserInputPtr in,
674 int xmlParserInputGrow (xmlParserInputPtr in,
680 xmlChar * xmlStrdup (const xmlChar *cur);
681 xmlChar * xmlStrndup (const xmlChar *cur,
683 xmlChar * xmlCharStrndup (const char *cur,
685 xmlChar * xmlCharStrdup (const char *cur);
686 xmlChar * xmlStrsub (const xmlChar *str,
689 const xmlChar * xmlStrchr (const xmlChar *str,
691 const xmlChar * xmlStrstr (const xmlChar *str,
693 const xmlChar * xmlStrcasestr (const xmlChar *str,
695 int xmlStrcmp (const xmlChar *str1,
696 const xmlChar *str2);
697 int xmlStrncmp (const xmlChar *str1,
700 int xmlStrcasecmp (const xmlChar *str1,
701 const xmlChar *str2);
702 int xmlStrncasecmp (const xmlChar *str1,
705 int xmlStrEqual (const xmlChar *str1,
706 const xmlChar *str2);
707 int xmlStrlen (const xmlChar *str);
708 xmlChar * xmlStrcat (xmlChar *cur,
710 xmlChar * xmlStrncat (xmlChar *cur,
715 * Basic parsing Interfaces
717 xmlDocPtr xmlParseDoc (xmlChar *cur);
718 xmlDocPtr xmlParseMemory (const char *buffer,
720 xmlDocPtr xmlParseFile (const char *filename);
721 int xmlSubstituteEntitiesDefault(int val);
722 int xmlKeepBlanksDefault (int val);
723 void xmlStopParser (xmlParserCtxtPtr ctxt);
724 int xmlPedanticParserDefault(int val);
725 int xmlLineNumbersDefault (int val);
730 xmlDocPtr xmlRecoverDoc (xmlChar *cur);
731 xmlDocPtr xmlRecoverMemory (const char *buffer,
733 xmlDocPtr xmlRecoverFile (const char *filename);
736 * Less common routines and SAX interfaces
738 int xmlParseDocument (xmlParserCtxtPtr ctxt);
739 int xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
740 xmlDocPtr xmlSAXParseDoc (xmlSAXHandlerPtr sax,
743 int xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
745 const char *filename);
746 int xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
750 xmlDocPtr xmlSAXParseMemory (xmlSAXHandlerPtr sax,
754 xmlDocPtr xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
759 xmlDocPtr xmlSAXParseFile (xmlSAXHandlerPtr sax,
760 const char *filename,
762 xmlDocPtr xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
763 const char *filename,
766 xmlDocPtr xmlSAXParseEntity (xmlSAXHandlerPtr sax,
767 const char *filename);
768 xmlDocPtr xmlParseEntity (const char *filename);
769 xmlDtdPtr xmlParseDTD (const xmlChar *ExternalID,
770 const xmlChar *SystemID);
771 xmlDtdPtr xmlSAXParseDTD (xmlSAXHandlerPtr sax,
772 const xmlChar *ExternalID,
773 const xmlChar *SystemID);
774 xmlDtdPtr xmlIOParseDTD (xmlSAXHandlerPtr sax,
775 xmlParserInputBufferPtr input,
776 xmlCharEncoding enc);
777 int xmlParseBalancedChunkMemory(xmlDocPtr doc,
778 xmlSAXHandlerPtr sax,
781 const xmlChar *string,
783 int xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
784 xmlSAXHandlerPtr sax,
787 const xmlChar *string,
790 int xmlParseExternalEntity (xmlDocPtr doc,
791 xmlSAXHandlerPtr sax,
797 int xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
803 * Parser contexts handling.
805 int xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
806 void xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
807 void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
808 void xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
809 const xmlChar* buffer,
810 const char *filename);
811 xmlParserCtxtPtr xmlCreateDocParserCtxt (xmlChar *cur);
814 * Reading/setting optional parsing features.
817 int xmlGetFeaturesList (int *len,
818 const char **result);
819 int xmlGetFeature (xmlParserCtxtPtr ctxt,
822 int xmlSetFeature (xmlParserCtxtPtr ctxt,
827 * Interfaces for the Push mode.
829 xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
833 const char *filename);
834 int xmlParseChunk (xmlParserCtxtPtr ctxt,
843 xmlParserCtxtPtr xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
845 xmlInputReadCallback ioread,
846 xmlInputCloseCallback ioclose,
848 xmlCharEncoding enc);
850 xmlParserInputPtr xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
851 xmlParserInputBufferPtr input,
852 xmlCharEncoding enc);
857 const xmlParserNodeInfo*
858 xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt,
859 const xmlNodePtr node);
860 void xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
861 void xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
862 unsigned long xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
863 const xmlNodePtr node);
864 void xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
865 const xmlParserNodeInfoPtr info);
868 * External entities handling actually implemented in xmlIO.
871 void xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
872 xmlExternalEntityLoader
873 xmlGetExternalEntityLoader(void);
875 xmlLoadExternalEntity (const char *URL,
877 xmlParserCtxtPtr ctxt);
882 #endif /* __XML_PARSER_H__ */