1 * Summary: the core parser module
2 * Description: Interfaces, constants and types related to the XML parser
4 * Copy: See Copyright for the status of this software.
6 * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
8 /if not defined(XML_PARSER_H__)
11 /include "libxmlrpg/xmlversion"
12 /include "libxmlrpg/xmlTypesC"
13 /include "libxmlrpg/tree"
14 /include "libxmlrpg/dict"
15 /include "libxmlrpg/hash"
16 /include "libxmlrpg/valid"
17 /include "libxmlrpg/entities"
18 /include "libxmlrpg/xmlerror"
19 /include "libxmlrpg/xmlstring"
21 * XML_DEFAULT_VERSION:
23 * The default version of XML used: 1.0
25 d XML_DEFAULT_VERSION...
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.
37 * xmlParserInputDeallocate:
38 * @str: the string to deallocate
40 * Callback for freeing some parser input allocations.
42 d xmlParserInputDeallocate...
43 d s * based(######typedef######)
48 d xmlParserInput ds based(xmlParserInputPtr)
50 d buf like(xmlParserInputBufferPtr) UTF-8 encoded buffer
51 d filename * const char *
52 d directory * const char *
56 d length like(xmlCint) Length if known
57 d line like(xmlCint) Current line
58 d col like(xmlCint) Current column
60 * NOTE: consumed is only tested for equality in the parser code,
61 * so even if there is an overflow this should not give troubles
62 * for parsing very large instances.
64 d consumed like(xmlCulong) # consumed xmlChars
65 d free like(xmlParserInputDeallocate) base deallocator
66 d encoding * const xmlChar *
67 d version * const xmlChar *
68 d standalone like(xmlCint) Standalone entity ?
69 d id like(xmlCint) Entity unique ID
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 d xmlParserNodeInfoPtr...
78 d s * based(######typedef######)
80 d xmlParserNodeInfo...
81 d ds based(xmlParserNodeInfoPtr)
83 d node like(xmlNodePtr) const
84 * Position & line # that text that created the node begins & ends on
85 d begin_pos like(xmlCulong)
86 d begin_line like(xmlCulong)
87 d end_pos like(xmlCulong)
88 d end_line like(xmlCulong)
90 d xmlParserNodeInfoSeqPtr...
91 d s * based(######typedef######)
93 d xmlParserNodeInfoSeq...
94 d ds based(xmlParserNodeInfoSeqPtr)
96 d maximum like(xmlCulong)
97 d length like(xmlCulong)
98 d buffer like(xmlParserNodeInfoPtr)
100 * xmlParserInputState:
102 * The parser is now working also as a state based parser.
103 * The recursive one use the state info for entities processing.
105 d xmlParserInputState...
106 d s based(######typedef######)
108 d XML_PARSER_EOF... Nothing to parse
110 d XML_PARSER_START... Nothing parsed
112 d XML_PARSER_MISC... Misc* b4 int subset
114 d XML_PARSER_PI c 2 In proc instr
115 d XML_PARSER_DTD... In some DTD content
117 d XML_PARSER_PROLOG... Misc* after int sbst
119 d XML_PARSER_COMMENT... Within a comment
121 d XML_PARSER_START_TAG... Within a start tag
123 d XML_PARSER_CONTENT... Within the content
125 d XML_PARSER_CDATA_SECTION... Within a CDATA
127 d XML_PARSER_END_TAG... Within a closing tag
129 d XML_PARSER_ENTITY_DECL... In an entity decl
131 d XML_PARSER_ENTITY_VALUE... In entity decl value
133 d XML_PARSER_ATTRIBUTE_VALUE... In attribute value
135 d XML_PARSER_SYSTEM_LITERAL... In a SYSTEM value
137 d XML_PARSER_EPILOG... Last end tag Misc*
139 d XML_PARSER_IGNORE... In IGNORED section
141 d XML_PARSER_PUBLIC_LITERAL... In a PUBLIC value
146 * Bit in the loadsubset context field to tell to do ID/REFs lookups.
147 * Use it to initialize xmlLoadExtDtdDefaultValue.
151 * XML_COMPLETE_ATTRS:
153 * Bit in the loadsubset context field to tell to do complete the
154 * elements attributes lists with the ones defaulted from the DTDs.
155 * Use it to initialize xmlLoadExtDtdDefaultValue.
157 d XML_COMPLETE_ATTRS...
162 * Bit in the loadsubset context field to tell to not do ID/REFs
164 * Used to initialize xmlLoadExtDtdDefaultValue in some special cases.
170 * A parser can operate in various modes
172 d xmlParserMode s based(######typedef######)
174 d XML_PARSE_UNKNOWN...
180 d XML_PARSE_PUSH_DOM...
182 d XML_PARSE_PUSH_SAX...
184 d XML_PARSE_READER...
189 * The parser context.
190 * NOTE This doesn't completely define the parser state, the (current ?)
191 * design of the parser uses recursive function calls since this allow
192 * and easy mapping from the production rules of the specification
193 * to the actual code. The drawback is that the actual function call
194 * also reflect the parser state. However most of the parsing routines
195 * takes as the only argument the parser context pointer, so migrating
196 * to a state based parser for progressive parsing shouldn't be too
199 d xmlParserCtxt ds based(xmlParserCtxtPtr)
201 d sax like(xmlSAXHandlerPtr) The SAX handler
202 d userData * SAX only-4 DOM build
203 d myDoc like(xmlDocPtr) Document being built
204 d wellFormed like(xmlCint) Well formed doc ?
205 d replaceEntities... Replace entities ?
207 d version * const xmlChar *
208 d encoding * const xmlChar *
209 d standalone like(xmlCint) Standalone document
210 d html like(xmlCint) HTML state/type
214 d input like(xmlParserInputPtr) Current input stream
215 d inputNr like(xmlCint) # current in streams
216 d inputMax like(xmlCint) Max # of in streams
217 d inputTab * xmlParserInputPtr *
219 * Node analysis stack only used for DOM building
221 d node like(xmlNodePtr) Current parsed node
222 d nodeNr like(xmlCint) Parsing stack depth
223 d nodeMax like(xmlCint) Max stack depth
224 d nodeTab * xmlNodePtr *
226 d record_info like(xmlCint) Keep node info ?
227 d node_seq likeds(xmlParserNodeInfoSeq) Parsed nodes info
229 d errNo like(xmlCint) Error code
231 d hasExternalSubset...
233 d hasPErefs like(xmlCint)
234 d external like(xmlCint) Parsing ext. entity?
236 d valid like(xmlCint) Valid document ?
237 d validate like(xmlCint) Try to validate ?
238 d vctxt likeds(xmlValidCtxt) Validity context
240 d instate like(xmlParserInputState) Current input type
241 d token like(xmlCint) Next look-ahead char
247 d name * const xmlChar *
248 d nameNr like(xmlCint) Parsing stack depth
249 d nameMax like(xmlCint) Max stack depth
250 d nameTab * const xmlChar * *
252 d nbChars like(xmlClong) # xmlChars processed
253 d checkIndex like(xmlClong) 4 progressive parse
254 d keepBlanks like(xmlCint) Ugly but ...
255 d disableSAX like(xmlCint) Disable SAX cllbacks
256 d inSubset like(xmlCint) In int 1/ext 2 sbset
257 d intSubName * const xmlChar *
258 d extSubURI * const xmlChar *
259 d extSubSytem * const xmlChar *
264 d spaceNr like(xmlCint) Parsing stack depth
265 d spaceMax like(xmlCint) Max stack depth
268 d depth like(xmlCint) To detect loops
269 d entity like(xmlParserInputPtr) To check boundaries
270 d charset like(xmlCint) In-memory content
271 d nodelen like(xmlCint) Speed up parsing
272 d nodemem like(xmlCint) Speed up parsing
273 d pedantic like(xmlCint) Enb. pedantic warng
276 d loadsubset like(xmlCint) Load ext. subset ?
277 d linenumbers like(xmlCint) Set line numbers ?
279 d recovery like(xmlCint) Run in recovery mode
280 d progressive like(xmlCint) Progressive parsing?
281 d dict like(xmlDictPtr) Parser dictionary
282 d atts * const xmlChar *
283 d maxatts like(xmlCint) Above array size
284 d docdict like(xmlCint) Use dictionary ?
286 * pre-interned strings
288 d str_xml * const xmlChar *
289 d str_xmlns * const xmlChar *
290 d str_xml_ms * const xmlChar *
292 * Everything below is used only by the new SAX mode
294 d sax2 like(xmlCint) New SAX mode ?
295 d nsNr like(xmlCint) # inherited nmspaces
296 d nsMax like(xmlCint) Array size
297 d nsTab * const xmlChar *
300 d attsDefault like(xmlHashTablePtr) Defaulted attrs
301 d attsSpecial like(xmlHashTablePtr) non-CDATA attrs
302 d nsWellFormed like(xmlCint) Doc namespace OK ?
303 d options like(xmlCint) Extra options
305 * Those fields are needed only for treaming parsing so far
307 d dictNames like(xmlCint) Dict names in tree ?
308 d freeElemsNr like(xmlCint) # free element nodes
309 d freeElems like(xmlNodePtr) Free elem nodes list
310 d freeAttrsNr like(xmlCint) # free attr. nodes
311 d freeAttrs like(xmlAttrPtr) Free attr noes list
313 * the complete error informations for the last error.
315 d lastError likeds(xmlError)
316 d parseMode like(xmlParserMode) The parser mode
317 d nbentities like(xmlCulong) # entity references
318 d sizeentities like(xmlCulong) Parsed entities size
320 * for use by HTML non-recursive parser
322 d nodeInfo like(xmlParserNodeInfoPtr) Current NodeInfo
323 d nodeInfoNr like(xmlCint) Parsing stack depth
324 d nodeInfoMax like(xmlCint) Max stack depth
325 d nodeInfoTab * xmlParserNodeInfo *
327 d input_id like(xmlCint) Label inputs ?
328 d sizeentcopy like(xmlCulong) Entity copy volume
334 d xmlSAXLocator ds based(xmlSAXLocatorPtr)
336 d getPublicId * procptr
337 d getSystemId * procptr
338 d getLineNumber * procptr
344 * A SAX handler is bunch of callbacks called by the parser when
345 * processing of the input generate data or structure informations.
347 * resolveEntitySAXFunc:
348 * @ctx: the user data (XML parser context)
349 * @publicId: The public ID of the entity
350 * @systemId: The system ID of the entity
353 * The entity loader, to control the loading of external entities,
354 * the application can either:
355 * - override this resolveEntity() callback in the SAX block
356 * - or better use the xmlSetExternalEntityLoader() function to
357 * set up it's own entity resolution routine
359 * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
361 d resolveEntitySAXFunc...
362 d s * based(######typedef######)
365 * internalSubsetSAXFunc:
366 * @ctx: the user data (XML parser context)
367 * @name: the root element name
368 * @ExternalID: the external ID
369 * @SystemID: the SYSTEM ID (e.g. filename or URL)
371 * Callback on internal subset declaration.
373 d internalSubsetSAXFunc...
374 d s * based(######typedef######)
377 * externalSubsetSAXFunc:
378 * @ctx: the user data (XML parser context)
379 * @name: the root element name
380 * @ExternalID: the external ID
381 * @SystemID: the SYSTEM ID (e.g. filename or URL)
383 * Callback on external subset declaration.
385 d externalSubsetSAXFunc...
386 d s * based(######typedef######)
390 * @ctx: the user data (XML parser context)
391 * @name: The entity name
393 * Get an entity by name.
395 * Returns the xmlEntityPtr if found.
397 d getEntitySAXFunc...
398 d s * based(######typedef######)
401 * getParameterEntitySAXFunc:
402 * @ctx: the user data (XML parser context)
403 * @name: The entity name
405 * Get a parameter entity by name.
407 * Returns the xmlEntityPtr if found.
409 d getParameterEntitySAXFunc...
410 d s * based(######typedef######)
414 * @ctx: the user data (XML parser context)
415 * @name: the entity name
416 * @type: the entity type
417 * @publicId: The public ID of the entity
418 * @systemId: The system ID of the entity
419 * @content: the entity value (without processing).
421 * An entity definition has been parsed.
423 d entityDeclSAXFunc...
424 d s * based(######typedef######)
427 * notationDeclSAXFunc:
428 * @ctx: the user data (XML parser context)
429 * @name: The name of the notation
430 * @publicId: The public ID of the entity
431 * @systemId: The system ID of the entity
433 * What to do when a notation declaration has been parsed.
435 d notationDeclSAXFunc...
436 d s * based(######typedef######)
439 * attributeDeclSAXFunc:
440 * @ctx: the user data (XML parser context)
441 * @elem: the name of the element
442 * @fullname: the attribute name
443 * @type: the attribute type
444 * @def: the type of default value
445 * @defaultValue: the attribute default value
446 * @tree: the tree of enumerated value set
448 * An attribute definition has been parsed.
450 d attributeDeclSAXFunc...
451 d s * based(######typedef######)
454 * elementDeclSAXFunc:
455 * @ctx: the user data (XML parser context)
456 * @name: the element name
457 * @type: the element type
458 * @content: the element value tree
460 * An element definition has been parsed.
462 d elementDeclSAXFunc...
463 d s * based(######typedef######)
466 * unparsedEntityDeclSAXFunc:
467 * @ctx: the user data (XML parser context)
468 * @name: The name of the entity
469 * @publicId: The public ID of the entity
470 * @systemId: The system ID of the entity
471 * @notationName: the name of the notation
473 * What to do when an unparsed entity declaration is parsed.
475 d unparsedEntityDeclSAXFunc...
476 d s * based(######typedef######)
479 * setDocumentLocatorSAXFunc:
480 * @ctx: the user data (XML parser context)
481 * @loc: A SAX Locator
483 * Receive the document locator at startup, actually xmlDefaultSAXLocator.
484 * Everything is available on the context, so this is useless in our case.
486 d setDocumentLocatorSAXFunc...
487 d s * based(######typedef######)
490 * startDocumentSAXFunc:
491 * @ctx: the user data (XML parser context)
493 * Called when the document start being processed.
495 d startDocumentSAXFunc...
496 d s * based(######typedef######)
499 * endDocumentSAXFunc:
500 * @ctx: the user data (XML parser context)
502 * Called when the document end has been detected.
504 d endDocumentSAXFunc...
505 d s * based(######typedef######)
508 * startElementSAXFunc:
509 * @ctx: the user data (XML parser context)
510 * @name: The element name, including namespace prefix
511 * @atts: An array of name/value attributes pairs, NULL terminated
513 * Called when an opening tag has been processed.
515 d startElementSAXFunc...
516 d s * based(######typedef######)
520 * @ctx: the user data (XML parser context)
521 * @name: The element name
523 * Called when the end of an element has been detected.
525 d endElementSAXFunc...
526 d s * based(######typedef######)
530 * @ctx: the user data (XML parser context)
531 * @name: The attribute name, including namespace prefix
532 * @value: The attribute value
534 * Handle an attribute that has been read by the parser.
535 * The default handling is to convert the attribute into an
536 * DOM subtree and past it in a new xmlAttr element added to
539 d attributeSAXFunc...
540 d s * based(######typedef######)
544 * @ctx: the user data (XML parser context)
545 * @name: The entity name
547 * Called when an entity reference is detected.
549 d referenceSAXFunc...
550 d s * based(######typedef######)
554 * @ctx: the user data (XML parser context)
555 * @ch: a xmlChar string
556 * @len: the number of xmlChar
558 * Receiving some chars from the parser.
560 d charactersSAXFunc...
561 d s * based(######typedef######)
564 * ignorableWhitespaceSAXFunc:
565 * @ctx: the user data (XML parser context)
566 * @ch: a xmlChar string
567 * @len: the number of xmlChar
569 * Receiving some ignorable whitespaces from the parser.
570 * UNUSED: by default the DOM building will use characters.
572 d ignorableWhitespaceSAXFunc...
573 d s * based(######typedef######)
576 * processingInstructionSAXFunc:
577 * @ctx: the user data (XML parser context)
578 * @target: the target name
579 * @data: the PI data's
581 * A processing instruction has been parsed.
583 d processingInstructionSAXFunc...
584 d s * based(######typedef######)
588 * @ctx: the user data (XML parser context)
589 * @value: the comment content
591 * A comment has been parsed.
594 d s * based(######typedef######)
598 * @ctx: the user data (XML parser context)
599 * @value: The pcdata content
600 * @len: the block length
602 * Called when a pcdata block has been parsed.
604 d cdataBlockSAXFunc...
605 d s * based(######typedef######)
609 * @ctx: an XML parser context
610 * @msg: the message to display/transmit
611 * @...: extra parameters for the message display
613 * Display and format a warning messages, callback.
616 d s * based(######typedef######)
620 * @ctx: an XML parser context
621 * @msg: the message to display/transmit
622 * @...: extra parameters for the message display
624 * Display and format an error messages, callback.
627 d s * based(######typedef######)
631 * @ctx: an XML parser context
632 * @msg: the message to display/transmit
633 * @...: extra parameters for the message display
635 * Display and format fatal error messages, callback.
636 * Note: so far fatalError() SAX callbacks are not used, error()
637 * get all the callbacks for errors.
639 d fatalErrorSAXFunc...
640 d s * based(######typedef######)
643 * isStandaloneSAXFunc:
644 * @ctx: the user data (XML parser context)
646 * Is this document tagged standalone?
650 d isStandaloneSAXFunc...
651 d s * based(######typedef######)
654 * hasInternalSubsetSAXFunc:
655 * @ctx: the user data (XML parser context)
657 * Does this document has an internal subset.
661 d hasInternalSubsetSAXFunc...
662 d s * based(######typedef######)
665 * hasExternalSubsetSAXFunc:
666 * @ctx: the user data (XML parser context)
668 * Does this document has an external subset?
672 d hasExternalSubsetSAXFunc...
673 d s * based(######typedef######)
676 ************************************************************************
678 * The SAX version 2 API extensions *
680 ************************************************************************
684 * Special constant found in SAX2 blocks initialized fields
686 d XML_SAX2_MAGIC c X'DEEDBEAF'
688 * startElementNsSAX2Func:
689 * @ctx: the user data (XML parser context)
690 * @localname: the local name of the element
691 * @prefix: the element namespace prefix if available
692 * @URI: the element namespace name if available
693 * @nb_namespaces: number of namespace definitions on that node
694 * @namespaces: pointer to the array of prefix/URI pairs namespace
696 * @nb_attributes: the number of attributes on that node
697 * @nb_defaulted: the number of defaulted attributes. The defaulted
698 * ones are at the end of the array
699 * @attributes: pointer to the array of
700 * (localname/prefix/URI/value/end) attribute values.
702 * SAX2 callback when an element start has been detected by the parser.
703 * It provides the namespace informations for the element, as well as
704 * the new namespace declarations on the element.
706 d startElementNsSAX2Func...
707 d s * based(######typedef######)
710 * endElementNsSAX2Func:
711 * @ctx: the user data (XML parser context)
712 * @localname: the local name of the element
713 * @prefix: the element namespace prefix if available
714 * @URI: the element namespace name if available
716 * SAX2 callback when an element end has been detected by the parser.
717 * It provides the namespace informations for the element.
719 d endElementNsSAX2Func...
720 d s * based(######typedef######)
723 d xmlSAXHandler ds based(xmlSAXHandlerPtr)
726 d like(internalSubsetSAXFunc)
727 d isStandalone like(isStandaloneSAXFunc)
728 d hasInternalSubset...
729 d like(hasInternalSubsetSAXFunc)
730 d hasExternalSubset...
731 d like(hasExternalSubsetSAXFunc)
732 d resolveEntity like(resolveEntitySAXFunc)
733 d getEntity like(getEntitySAXFunc)
734 d entityDecl like(entityDeclSAXFunc)
735 d notationDecl like(notationDeclSAXFunc)
736 d attributeDecl like(attributeDeclSAXFunc)
737 d elementDecl like(elementDeclSAXFunc)
738 d unparsedEntityDecl...
739 d like(unparsedEntityDeclSAXFunc)
740 d setDocumentLocator...
741 d like(setDocumentLocatorSAXFunc)
742 d startDocument like(startDocumentSAXFunc)
743 d endDocument like(endDocumentSAXFunc)
744 d startElement like(startElementSAXFunc)
745 d endElement like(endElementSAXFunc)
746 d reference like(referenceSAXFunc)
747 d characters like(charactersSAXFunc)
748 d ignorableWhitespace...
749 d like(ignorableWhitespaceSAXFunc)
750 d processingInstruction...
751 d like(processingInstructionSAXFunc)
752 d comment like(commentSAXFunc)
753 d warning like(warningSAXFunc)
754 d error like(errorSAXFunc)
755 d fatalError like(fatalErrorSAXFunc)
756 d getParameterEntity...
757 d like(getParameterEntitySAXFunc)
758 d cdataBlock like(cdataBlockSAXFunc)
760 d like(externalSubsetSAXFunc)
761 d initialized like(xmlCuint)
763 * The following fields are extensions available only on version 2
767 d like(startElementNsSAX2Func)
768 d endELementNs like(endElementNsSAX2Func)
769 d serror like(xmlStructuredErrorFunc)
773 d xmlSAXHandlerV1Ptr...
774 d s * based(######typedef######)
777 d ds based(xmlSAXHandlerV1Ptr)
780 d like(internalSubsetSAXFunc)
781 d isStandalone like(isStandaloneSAXFunc)
782 d hasInternalSubset...
783 d like(hasInternalSubsetSAXFunc)
784 d hasExternalSubset...
785 d like(hasExternalSubsetSAXFunc)
786 d resolveEntity like(resolveEntitySAXFunc)
787 d getEntity like(getEntitySAXFunc)
788 d entityDecl like(entityDeclSAXFunc)
789 d notationDecl like(notationDeclSAXFunc)
790 d attributeDecl like(attributeDeclSAXFunc)
791 d elementDecl like(elementDeclSAXFunc)
792 d unparsedEntityDecl...
793 d like(unparsedEntityDeclSAXFunc)
794 d setDocumentLocator...
795 d like(setDocumentLocatorSAXFunc)
796 d startDocument like(startDocumentSAXFunc)
797 d endDocument like(endDocumentSAXFunc)
798 d startElement like(startElementSAXFunc)
799 d endElement like(endElementSAXFunc)
800 d reference like(referenceSAXFunc)
801 d characters like(charactersSAXFunc)
802 d ignorableWhitespace...
803 d like(ignorableWhitespaceSAXFunc)
804 d processingInstruction...
805 d like(processingInstructionSAXFunc)
806 d comment like(commentSAXFunc)
807 d warning like(warningSAXFunc)
808 d error like(errorSAXFunc)
809 d fatalError like(fatalErrorSAXFunc)
810 d getParameterEntity...
811 d like(getParameterEntitySAXFunc)
812 d cdataBlock like(cdataBlockSAXFunc)
814 d like(externalSubsetSAXFunc)
815 d initialized like(xmlCuint)
817 * xmlExternalEntityLoader:
818 * @URL: The System ID of the resource requested
819 * @ID: The Public ID of the resource requested
820 * @context: the XML parser context
822 * External entity loaders types.
824 * Returns the entity input parser.
826 d xmlExternalEntityLoader...
827 d s * based(######typedef######)
830 /include "libxmlrpg/encoding"
831 /include "libxmlrpg/xmlIO"
832 /include "libxmlrpg/globals"
836 d xmlInitParser pr extproc('xmlInitParser')
838 d xmlCleanupParser...
839 d pr extproc('xmlCleanupParser')
843 d xmlParserInputRead...
844 d pr extproc('xmlParserInputRead')
846 d in value like(xmlParserInputPtr)
847 d len value like(xmlCint)
849 d xmlParserInputGrow...
850 d pr extproc('xmlParserInputGrow')
852 d in value like(xmlParserInputPtr)
853 d len value like(xmlCint)
855 * Basic parsing Interfaces
857 /if defined(LIBXML_SAX1_ENABLED)
858 d xmlParseDoc pr extproc('xmlParseDoc')
860 d cur * value options(*string) const xmlChar *
862 d xmlParseFile pr extproc('xmlParseFile')
864 d filename * value options(*string) const char *
866 d xmlParseMemory pr extproc('xmlParseMemory')
868 d buffer * value options(*string) const char *
869 d size value like(xmlCint)
870 /endif LIBXML_SAX1_ENABLED
872 d xmlSubstituteEntitiesDefault...
874 d 'xmlSubstituteEntitiesDefault')
876 d val value like(xmlCint)
878 d xmlKeepBlanksDefault...
879 d pr extproc('xmlKeepBlanksDefault')
881 d val value like(xmlCint)
883 d xmlStopParser pr extproc('xmlStopParser')
884 d ctxt value like(xmlParserCtxtPtr)
886 d xmlPedanticParserDefault...
887 d pr extproc('xmlPedanticParserDefault')
889 d val value like(xmlCint)
891 d xmlLineNumbersDefault...
892 d pr extproc('xmlLineNumbersDefault')
894 d val value like(xmlCint)
896 /if defined(LIBXML_SAX1_ENABLED)
899 d xmlRecoverDoc pr extproc('xmlRecoverDoc')
901 d cur * value options(*string) const xmlChar *
903 d xmlRecoverMemory...
904 d pr extproc('xmlRecoverMemory')
906 d buffer * value options(*string) const char *
907 d size value like(xmlCint)
909 d xmlRecoverFile pr extproc('xmlRecoverFile')
911 d filename * value options(*string) const char *
912 /endif LIBXML_SAX1_ENABLED
914 * Less common routines and SAX interfaces
916 d xmlParseDocument...
917 d pr extproc('xmlParseDocument')
919 d ctxt value like(xmlParserCtxtPtr)
921 d xmlParseExtParsedEnt...
922 d pr extproc('xmlParseExtParsedEnt')
924 d ctxt value like(xmlParserCtxtPtr)
926 /if defined(LIBXML_SAX1_ENABLED)
927 d xmlSAXUserParseFile...
928 d pr extproc('xmlSAXUserParseFile')
930 d sax value like(xmlSAXHandlerPtr)
931 d user_data * value void *
932 d filename * value options(*string) const char *
934 d xmlSAXUserParseMemory...
935 d pr extproc('xmlSAXUserParseMemory')
937 d sax value like(xmlSAXHandlerPtr)
938 d user_data * value void *
939 d buffer * value options(*string) const char *
940 d size value like(xmlCint)
942 d xmlSAXParseDoc pr extproc('xmlSAXParseDoc')
944 d sax value like(xmlSAXHandlerPtr)
945 d cur * value options(*string) const xmlChar *
946 d recovery value like(xmlCint)
948 d xmlSAXParseMemory...
949 d pr extproc('xmlSAXParseMemory')
951 d sax value like(xmlSAXHandlerPtr)
952 d buffer * value options(*string) const char *
953 d size value like(xmlCint)
954 d recovery value like(xmlCint)
956 d xmlSAXParseMemoryWithData...
957 d pr extproc('xmlSAXParseMemoryWithData')
959 d sax value like(xmlSAXHandlerPtr)
960 d buffer * value options(*string) const char *
961 d size value like(xmlCint)
962 d recovery value like(xmlCint)
963 d data * value void *
966 d pr extproc('xmlSAXParseFile')
968 d sax value like(xmlSAXHandlerPtr)
969 d filename * value options(*string) const char *
970 d recovery value like(xmlCint)
972 d xmlSAXParseFileWithData...
973 d pr extproc('xmlSAXParseFileWithData')
975 d sax value like(xmlSAXHandlerPtr)
976 d filename * value options(*string) const char *
977 d recovery value like(xmlCint)
978 d data * value void *
980 d xmlSAXParseEntity...
981 d pr extproc('xmlSAXParseEntity')
983 d sax value like(xmlSAXHandlerPtr)
984 d filename * value options(*string) const char *
987 d pr extproc('xmlParseEntity')
989 d filename * value options(*string) const char *
990 /endif LIBXML_SAX1_ENABLED
992 /if defined(LIBXML_VALID_ENABLED)
993 d xmlSAXParseDTD pr extproc('xmlSAXParseDTD')
995 d sax value like(xmlSAXHandlerPtr)
996 d ExternalID * value options(*string) const xmlChar *
997 d SystemID * value options(*string) const xmlChar *
999 d xmlParseDTD pr extproc('xmlParseDTD')
1001 d ExternalID * value options(*string) const xmlChar *
1002 d SystemID * value options(*string) const xmlChar *
1004 d xmlIOParseDTD pr extproc('xmlIOParseDTD')
1006 d sax value like(xmlSAXHandlerPtr)
1007 d input value like(xmlParserInputBufferPtr)
1008 d enc value like(xmlCharEncoding)
1009 /endif LIBXML_VALID_ENABLED
1011 /if defined(LIBXML_SAX1_ENABLED)
1012 d xmlParseBalancedChunkMemory...
1014 d 'xmlParseBalancedChunkMemory')
1016 d doc value like(xmlDocPtr)
1017 d sax value like(xmlSAXHandlerPtr)
1018 d user_data * value void *
1019 d depth value like(xmlCint)
1020 d user_data * value void *
1021 d string * value options(*string) const xmlChar *
1022 d lst * value xmlNodePtr *
1023 /endif LIBXML_SAX1_ENABLED
1025 d xmlParseInNodeContext...
1026 d pr extproc('xmlParseInNodeContext')
1027 d like(xmlParserErrors)
1028 d node value like(xmlNodePtr)
1029 d data * value options(*string) const char *
1030 d datalen value like(xmlCint)
1031 d options value like(xmlCint)
1032 d lst * value xmlNodePtr *
1034 /if defined(LIBXML_SAX1_ENABLED)
1035 d xmlParseBalancedChunkMemoryRecover...
1037 d 'xmlParseBalancedChunkMemoryRecover')
1039 d doc value like(xmlDocPtr)
1040 d sax value like(xmlSAXHandlerPtr)
1041 d user_data * value void *
1042 d depth value like(xmlCint)
1043 d string * value options(*string) const xmlChar *
1044 d lst * value xmlNodePtr *
1045 d recover value like(xmlCint)
1047 d xmlParseExternalEntity...
1048 d pr extproc('xmlParseExternalEntity')
1050 d doc value like(xmlDocPtr)
1051 d sax value like(xmlSAXHandlerPtr)
1052 d user_data * value void *
1053 d depth value like(xmlCint)
1054 d URL * value options(*string) const xmlChar *
1055 d ID * value options(*string) const xmlChar *
1056 d lst * value xmlNodePtr *
1057 /endif LIBXML_SAX1_ENABLED
1059 d xmlParseCtxtExternalEntity...
1060 d pr extproc('xmlParseCtxtExternalEntity')
1062 d sax value like(xmlSAXHandlerPtr)
1063 d URL * value options(*string) const xmlChar *
1064 d ID * value options(*string) const xmlChar *
1065 d lst * value xmlNodePtr *
1067 * Parser contexts handling.
1069 d xmlNewParserCtxt...
1070 d pr extproc('xmlNewParserCtxt')
1071 d like(xmlParserCtxtPtr)
1073 d xmlInitParserCtxt...
1074 d pr extproc('xmlInitParserCtxt')
1076 d ctxt value like(xmlParserCtxtPtr)
1078 d xmlClearParserCtxt...
1079 d pr extproc('xmlClearParserCtxt')
1080 d ctxt value like(xmlParserCtxtPtr)
1082 d xmlFreeParserCtxt...
1083 d pr extproc('xmlFreeParserCtxt')
1084 d ctxt value like(xmlParserCtxtPtr)
1086 /if defined(LIBXML_SAX1_ENABLED)
1087 d xmlSetupParserForBuffer...
1088 d pr extproc('xmlSetupParserForBuffer')
1089 d ctxt value like(xmlParserCtxtPtr)
1090 d buffer * value options(*string) const xmlChar *
1091 d filename * value options(*string) const char *
1092 /endif LIBXML_SAX1_ENABLED
1094 d xmlCreateDocParserCtxt...
1095 d pr extproc('xmlCreateDocParserCtxt')
1096 d like(xmlParserCtxtPtr)
1097 d cur * value options(*string) const xmlChar *
1099 /if defined(LIBXML_LEGACY_ENABLED)
1100 * Reading/setting optional parsing features.
1102 d xmlGetFeaturesList...
1103 d pr extproc('xmlGetFeaturesList')
1106 d result * const char *(*)
1108 d xmlGetFeature pr extproc('xmlGetFeature')
1110 d ctxt value like(xmlParserCtxtPtr)
1111 d name * value options(*string) const char *
1112 d result * value void *
1114 d xmlSetFeature pr extproc('xmlSetFeature')
1116 d ctxt value like(xmlParserCtxtPtr)
1117 d name * value options(*string) const char *
1118 d result * value void *
1119 /endif LIBXML_LEGACY_ENABLD
1121 /if defined(LIBXML_PUSH_ENABLED)
1122 * Interfaces for the Push mode.
1124 d xmlCreatePushParserCtxt...
1125 d pr extproc('xmlCreatePushParserCtxt')
1126 d like(xmlParserCtxtPtr)
1127 d sax value like(xmlSAXHandlerPtr)
1128 d user_data * value void *
1129 d chunk * value options(*string) const char *
1130 d size value like(xmlCint)
1131 d filename * value options(*string) const char *
1133 d xmlParseChunk pr extproc('xmlParseChunk')
1135 d ctxt value like(xmlParserCtxtPtr)
1136 d chunk * value options(*string) const char *
1137 d size value like(xmlCint)
1138 d terminate value like(xmlCint)
1139 /endif LIBXML_PUSH_ENABLED
1143 d xmlCreateIOParserCtxt...
1144 d pr extproc('xmlCreateIOParserCtxt')
1145 d like(xmlParserCtxtPtr)
1146 d sax value like(xmlSAXHandlerPtr)
1147 d user_data * value void *
1148 d ioread value like(xmlInputReadCallback)
1149 d ioclose value like(xmlInputCloseCallback)
1150 d ioctx * value void *
1151 d enc value like(xmlCharEncoding)
1153 d xmlNewIOInputStream...
1154 d pr extproc('xmlNewIOInputStream')
1155 d like(xmlParserInputPtr)
1156 d ctxt value like(xmlParserCtxtPtr)
1157 d input value like(xmlParserInputBufferPtr)
1158 d enc value like(xmlCharEncoding)
1162 d xmlParserFindNodeInfo...
1163 d pr * extproc('xmlParserFindNodeInfo') xmlParserNodeInfo *
1164 d ctxt value like(xmlParserCtxtPtr)
1165 d node value like(xmlNodePtr) const
1167 d xmlInitNodeInfoSeq...
1168 d pr extproc('xmlInitNodeInfoSeq')
1169 d seq value like(xmlParserNodeInfoSeqPtr)
1171 d xmlClearNodeInfoSeq...
1172 d pr extproc('xmlClearNodeInfoSeq')
1173 d seq value like(xmlParserNodeInfoSeqPtr)
1175 d xmlParserFindNodeInfoIndex...
1176 d pr extproc('xmlParserFindNodeInfoIndex')
1178 d seq value like(xmlParserNodeInfoSeqPtr)
1179 d node value like(xmlNodePtr) const
1181 d xmlParserAddNodeInfo...
1182 d pr extproc('xmlParserAddNodeInfo')
1183 d ctxt value like(xmlParserCtxtPtr)
1184 d info value like(xmlParserNodeInfoPtr) const
1186 * External entities handling actually implemented in xmlIO.
1188 d xmlSetExternalEntityLoader...
1189 d pr extproc('xmlSetExternalEntityLoader')
1190 d f value like(xmlExternalEntityLoader)
1192 d xmlGetExternalEntityLoader...
1193 d pr extproc('xmlGetExternalEntityLoader')
1194 d like(xmlExternalEntityLoader)
1196 d xmlLoadExternalEntity...
1197 d pr extproc('xmlLoadExternalEntity')
1198 d like(xmlParserInputPtr)
1199 d URL * value options(*string) const char *
1200 d ID * value options(*string) const char *
1201 d ctxt value like(xmlParserCtxtPtr)
1203 * Index lookup, actually implemented in the encoding module
1205 d xmlByteConsumed...
1206 d pr extproc('xmlByteConsumed')
1208 d ctxt value like(xmlParserCtxtPtr)
1210 * New set of simpler/more flexible APIs
1214 * This is the set of XML parser options that can be passed down
1215 * to the xmlReadDoc() and similar calls.
1217 d xmlParserOption...
1218 d s based(######typedef######)
1220 d XML_PARSE_RECOVER... Recover on errors
1222 d XML_PARSE_NOENT... Substitute entities
1224 d XML_PARSE_DTDLOAD... Load external subset
1226 d XML_PARSE_DTDATTR... Default DTD attrs
1228 d XML_PARSE_DTDVALID... Validate with DTD
1230 d XML_PARSE_NOERROR... Suppress err reports
1232 d XML_PARSE_NOWARNING... Suppr warn reports
1234 d XML_PARSE_PEDANTIC... Pedantic err report
1236 d XML_PARSE_NOBLANKS... Remove blank nodes
1238 d XML_PARSE_SAX1... Use SAX1 internally
1240 d XML_PARSE_XINCLUDE... Impl XInclude subst
1242 d XML_PARSE_NONET... Forbid netwrk access
1244 d XML_PARSE_NODICT... No contxt dict reuse
1246 d XML_PARSE_NSCLEAN... Rmv redndnt ns decls
1248 d XML_PARSE_NOCDATA... CDATA as text nodes
1250 d XML_PARSE_NOXINCNODE... No XINCL START/END
1252 d XML_PARSE_COMPACT... Compact text nodes
1254 d XML_PARSE_OLD10... B4 upd5 compatible
1256 d XML_PARSE_NOBASEFIX... No XINC xml:base fix
1258 d XML_PARSE_HUGE... No parsing limit
1260 d XML_PARSE_OLDSAX... Use SAX2 b4 2.7.0
1262 d XML_PARSE_IGNORE_ENC... No int doc code hint
1264 d XML_PARSE_BIG_LINES... Big line#-->PSVI fld
1267 d xmlCtxtReset pr extproc('xmlCtxtReset')
1268 d ctxt value like(xmlParserCtxtPtr)
1270 d xmlCtxtResetPush...
1271 d pr extproc('xmlCtxtResetPush')
1273 d ctxt value like(xmlParserCtxtPtr)
1274 d chunk * value options(*string) const char *
1275 d size value like(xmlCint)
1276 d filename * value options(*string) const char *
1277 d encoding * value options(*string) const char *
1279 d xmlCtxtUseOptions...
1280 d pr extproc('xmlCtxtUseOptions')
1282 d ctxt value like(xmlParserCtxtPtr)
1283 d options value like(xmlCint)
1285 d xmlReadDoc pr extproc('xmlReadDoc')
1287 d cur * value options(*string) const xmlChar *
1288 d URL * value options(*string) const char *
1289 d encoding * value options(*string) const char *
1290 d options value like(xmlCint)
1292 d xmlReadFile pr extproc('xmlReadFile')
1294 d URL * value options(*string) const char *
1295 d encoding * value options(*string) const char *
1296 d options value like(xmlCint)
1298 d xmlReadMemory pr extproc('xmlReadMemory')
1300 d buffer * value options(*string) const char *
1301 d size value like(xmlCint)
1302 d URL * value options(*string) const char *
1303 d encoding * value options(*string) const char *
1304 d options value like(xmlCint)
1306 d xmlReadFd pr extproc('xmlReadFd')
1308 d fd value like(xmlCint)
1309 d URL * value options(*string) const char *
1310 d encoding * value options(*string) const char *
1311 d options value like(xmlCint)
1313 d xmlReadIO pr extproc('xmlReadIO')
1315 d ioread value like(xmlInputReadCallback)
1316 d ioclose value like(xmlInputCloseCallback)
1317 d ioctx * value void *
1318 d URL * value options(*string) const char *
1319 d encoding * value options(*string) const char *
1320 d options value like(xmlCint)
1322 d xmlCtxtReadDoc pr extproc('xmlCtxtReadDoc')
1324 d ctxt value like(xmlParserCtxtPtr)
1325 d cur * value options(*string) const xmlChar *
1326 d URL * value options(*string) const char *
1327 d encoding * value options(*string) const char *
1328 d options value like(xmlCint)
1330 d xmlCtxtReadFile...
1331 d pr extproc('xmlCtxtReadFile')
1333 d ctxt value like(xmlParserCtxtPtr)
1334 d filename * value options(*string) const char *
1335 d encoding * value options(*string) const char *
1336 d options value like(xmlCint)
1338 d xmlCtxtReadMemory...
1339 d pr extproc('xmlCtxtReadMemory')
1341 d ctxt value like(xmlParserCtxtPtr)
1342 d buffer * value options(*string) const char *
1343 d size value like(xmlCint)
1344 d URL * value options(*string) const char *
1345 d encoding * value options(*string) const char *
1346 d options value like(xmlCint)
1348 d xmlCtxtReadFd pr extproc('xmlCtxtReadFd')
1350 d ctxt value like(xmlParserCtxtPtr)
1351 d fd value like(xmlCint)
1352 d URL * value options(*string) const char *
1353 d encoding * value options(*string) const char *
1354 d options value like(xmlCint)
1356 d xmlCtxtReadIO pr extproc('xmlCtxtReadIO')
1358 d ctxt value like(xmlParserCtxtPtr)
1359 d ioread value like(xmlInputReadCallback)
1360 d ioclose value like(xmlInputCloseCallback)
1361 d ioctx * value void *
1362 d URL * value options(*string) const char *
1363 d encoding * value options(*string) const char *
1364 d options value like(xmlCint)
1366 * Library wide options
1370 * Used to examine the existance of features that can be enabled
1371 * or disabled at compile-time.
1372 * They used to be called XML_FEATURE_xxx but this clashed with Expat
1374 d xmlFeature s based(######typedef######)
1376 d XML_WITH_THREAD...
1379 d XML_WITH_OUTPUT...
1382 d XML_WITH_READER...
1384 d XML_WITH_PATTERN...
1386 d XML_WITH_WRITER...
1390 d XML_WITH_HTTP c 10
1393 d XML_WITH_HTML c 12
1394 d XML_WITH_LEGACY...
1396 d XML_WITH_C14N c 14
1397 d XML_WITH_CATALOG...
1401 d XML_WITH_XPTR c 17
1402 d XML_WITH_XINCLUDE...
1406 d XML_WITH_ISO8859X...
1408 d XML_WITH_UNICODE...
1410 d XML_WITH_REGEXP...
1412 d XML_WITH_AUTOMATA...
1414 d XML_WITH_EXPR c 24
1415 d XML_WITH_SCHEMAS...
1417 d XML_WITH_SCHEMATRON...
1419 d XML_WITH_MODULES...
1423 d XML_WITH_DEBUG_MEM...
1425 d XML_WITH_DEBUG_RUN...
1427 d XML_WITH_ZLIB c 31
1429 d XML_WITH_LZMA c 33
1430 d XML_WITH_NONE c 99999
1432 d xmlHasFeature pr extproc('xmlHasFeature')
1434 d feature value like(xmlFeature)
1436 /endif XML_PARSER_H__