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/tree"
13 /include "libxmlrpg/dict"
14 /include "libxmlrpg/hash"
15 /include "libxmlrpg/valid"
16 /include "libxmlrpg/entities"
17 /include "libxmlrpg/xmlerror"
18 /include "libxmlrpg/xmlstring"
20 * XML_DEFAULT_VERSION:
22 * The default version of XML used: 1.0
24 d XML_DEFAULT_VERSION...
29 * An xmlParserInput is an input flow for the XML processor.
30 * Each entity parsed is associated an xmlParserInput (except the
31 * few predefined ones). This is the case both for internal entities
32 * - in which case the flow is already completely in memory - or
33 * external entities - in which case we use the buf structure for
34 * progressive reading and I18N conversions to the internal UTF-8 format.
36 * xmlParserInputDeallocate:
37 * @str: the string to deallocate
39 * Callback for freeing some parser input allocations.
41 d xmlParserInputDeallocate...
42 d s * based(######typedef######)
47 d xmlParserInput ds based(xmlParserInputPtr)
49 d buf like(xmlParserInputBufferPtr) UTF-8 encoded buffer
50 d filename * const char *
51 d directory * const char *
55 d length 10i 0 Length if known
56 d line 10i 0 Current line
57 d col 10i 0 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 d consumed 20u 0 # consumed xmlChars
64 d free like(xmlParserInputDeallocate) base deallocator
65 d encoding * const xmlChar *
66 d version * const xmlChar *
67 d standalone 10i 0 Standalone entity ?
68 d id 10i 0 Entity unique ID
72 * The parser can be asked to collect Node informations, i.e. at what
73 * place in the file they were detected.
74 * NOTE: This is off by default and not very well tested.
76 d xmlParserNodeInfoPtr...
77 d s * based(######typedef######)
79 d xmlParserNodeInfo...
80 d ds based(xmlParserNodeInfoPtr)
82 d node like(xmlNodePtr) const
83 * Position & line # that text that created the node begins & ends on
89 d xmlParserNodeInfoSeqPtr...
90 d s * based(######typedef######)
92 d xmlParserNodeInfoSeq...
93 d ds based(xmlParserNodeInfoSeqPtr)
97 d buffer like(xmlParserNodeInfoPtr)
99 * xmlParserInputState:
101 * The parser is now working also as a state based parser.
102 * The recursive one use the state info for entities processing.
104 d xmlParserInputState...
105 d s 10i 0 based(######typedef######) enum
106 d XML_PARSER_EOF... Nothing to parse
108 d XML_PARSER_START... Nothing parsed
110 d XML_PARSER_MISC... Misc* b4 int subset
112 d XML_PARSER_PI c 2 In proc instr
113 d XML_PARSER_DTD... In some DTD content
115 d XML_PARSER_PROLOG... Misc* after int sbst
117 d XML_PARSER_COMMENT... Within a comment
119 d XML_PARSER_START_TAG... Within a start tag
121 d XML_PARSER_CONTENT... Within the content
123 d XML_PARSER_CDATA_SECTION... Within a CDATA
125 d XML_PARSER_END_TAG... Within a closing tag
127 d XML_PARSER_ENTITY_DECL... In an entity decl
129 d XML_PARSER_ENTITY_VALUE... In entity decl value
131 d XML_PARSER_ATTRIBUTE_VALUE... In attribute value
133 d XML_PARSER_SYSTEM_LITERAL... In a SYSTEM value
135 d XML_PARSER_EPILOG... Last end tag Misc*
137 d XML_PARSER_IGNORE... In IGNORED section
139 d XML_PARSER_PUBLIC_LITERAL... In a PUBLIC value
144 * Bit in the loadsubset context field to tell to do ID/REFs lookups.
145 * Use it to initialize xmlLoadExtDtdDefaultValue.
149 * XML_COMPLETE_ATTRS:
151 * Bit in the loadsubset context field to tell to do complete the
152 * elements attributes lists with the ones defaulted from the DTDs.
153 * Use it to initialize xmlLoadExtDtdDefaultValue.
155 d XML_COMPLETE_ATTRS...
160 * Bit in the loadsubset context field to tell to not do ID/REFs
162 * Used to initialize xmlLoadExtDtdDefaultValue in some special cases.
168 * A parser can operate in various modes
170 d xmlParserMode s 10i 0 based(######typedef######) enum
171 d XML_PARSE_UNKNOWN...
177 d XML_PARSE_PUSH_DOM...
179 d XML_PARSE_PUSH_SAX...
181 d XML_PARSE_READER...
186 * The parser context.
187 * NOTE This doesn't completely define the parser state, the (current ?)
188 * design of the parser uses recursive function calls since this allow
189 * and easy mapping from the production rules of the specification
190 * to the actual code. The drawback is that the actual function call
191 * also reflect the parser state. However most of the parsing routines
192 * takes as the only argument the parser context pointer, so migrating
193 * to a state based parser for progressive parsing shouldn't be too
196 d xmlParserCtxt ds based(xmlParserCtxtPtr)
198 d sax like(xmlSAXHandlerPtr) The SAX handler
199 d userData * SAX only-4 DOM build
200 d myDoc like(xmlDocPtr) Document being built
201 d wellFormed 10i 0 Well formed doc ?
202 d replaceEntities... Replace entities ?
204 d version * const xmlChar *
205 d encoding * const xmlChar *
206 d standalone 10i 0 Standalone document
207 d html 10i 0 HTML state/type
211 d input like(xmlParserInputPtr) Current input stream
212 d inputNr 10i 0 # current in streams
213 d inputMax 10i 0 Max # of in streams
214 d inputTab * xmlParserInputPtr *
216 * Node analysis stack only used for DOM building
218 d node like(xmlNodePtr) Current parsed node
219 d nodeNr 10i 0 Parsing stack depth
220 d nodeMax 10i 0 Max stack depth
221 d nodeTab * xmlNodePtr *
223 d record_info 10i 0 Keep node info ?
224 d node_seq like(xmlParserNodeInfoSeq) Parsed nodes info
226 d errNo 10i 0 Error code
228 d hasExternalSubset...
231 d external 10i 0 Parsing ext. entity?
233 d valid 10i 0 Valid document ?
234 d validate 10i 0 Try to validate ?
235 d vctxt like(xmlValidCtxt) Validity context
237 d instate like(xmlParserInputState) Current input type
238 d token 10i 0 Next look-ahead char
244 d name * const xmlChar *
245 d nameNr 10i 0 Parsing stack depth
246 d nameMax 10i 0 Max stack depth
247 d nameTab * const xmlChar * *
249 d nbChars 20i 0 # xmlChars processed
250 d checkIndex 20i 0 4 progressive parse
251 d keepBlanks 10i 0 Ugly but ...
252 d disableSAX 10i 0 Disable SAX cllbacks
253 d inSubset 10i 0 In int 1/ext 2 sbset
254 d intSubName * const xmlChar *
255 d extSubURI * const xmlChar *
256 d extSubSytem * const xmlChar *
261 d spaceNr 10i 0 Parsing stack depth
262 d spaceMax 10i 0 Max stack depth
265 d depth 10i 0 To detect loops
266 d entity like(xmlParserInputPtr) To check boundaries
267 d charset 10i 0 In-memory content
268 d nodelen 10i 0 Speed up parsing
269 d nodemem 10i 0 Speed up parsing
270 d pedantic 10i 0 Enb. pedantic warng
273 d loadsubset 10i 0 Load ext. subset ?
274 d linenumbers 10i 0 Set line numbers ?
276 d recovery 10i 0 Run in recovery mode
277 d progressive 10i 0 Progressive parsing?
278 d dict like(xmlDictPtr) Parser dictionary
279 d atts * const xmlChar *
280 d maxatts 10i 0 Above array size
281 d docdict 10i 0 Use dictionary ?
283 * pre-interned strings
285 d str_xml * const xmlChar *
286 d str_xmlns * const xmlChar *
287 d str_xml_ms * const xmlChar *
289 * Everything below is used only by the new SAX mode
291 d sax2 10i 0 New SAX mode ?
292 d nsNr 10i 0 # inherited nmspaces
293 d nsMax 10i 0 Array size
294 d nsTab * const xmlChar *
297 d attsDefault like(xmlHashTablePtr) Defaulted attrs
298 d attsSpecial like(xmlHashTablePtr) non-CDATA attrs
299 d nsWellFormed 10i 0 Doc namespace OK ?
300 d options 10i 0 Extra options
302 * Those fields are needed only for treaming parsing so far
304 d dictNames 10i 0 Dict names in tree ?
305 d freeElemsNr 10i 0 # free element nodes
306 d freeElems like(xmlNodePtr) Free elem nodes list
307 d freeAttrsNr 10i 0 # free attr. nodes
308 d freeAttrs like(xmlAttrPtr) Free attr noes list
310 * the complete error informations for the last error.
312 d lastError like(xmlError)
313 d parseMode like(xmlParserMode) The parser mode
314 d nbentities 20u 0 # entity references
315 d sizeentities 20u 0 Parsed entities size
317 * for use by HTML non-recursive parser
319 d nodeInfo like(xmlParserNodeInfo) Current NodeInfo
320 d nodeInfoNr 10i 0 Parsing stack depth
321 d nodeInfoMax 10i 0 Max stack depth
322 d nodeInfoTab * xmlParserNodeInfo *
324 d input_id 10i 0 Label inputs ?
325 d sizeentcopy 20u 0 Entity copy volume
331 d xmlSAXLocator ds based(xmlSAXLocatorPtr)
333 d getPublicId * procptr
334 d getSystemId * procptr
335 d getLineNumber * procptr
341 * A SAX handler is bunch of callbacks called by the parser when
342 * processing of the input generate data or structure informations.
344 * resolveEntitySAXFunc:
345 * @ctx: the user data (XML parser context)
346 * @publicId: The public ID of the entity
347 * @systemId: The system ID of the entity
350 * The entity loader, to control the loading of external entities,
351 * the application can either:
352 * - override this resolveEntity() callback in the SAX block
353 * - or better use the xmlSetExternalEntityLoader() function to
354 * set up it's own entity resolution routine
356 * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
358 d resolveEntitySAXFunc...
359 d s * based(######typedef######)
362 * internalSubsetSAXFunc:
363 * @ctx: the user data (XML parser context)
364 * @name: the root element name
365 * @ExternalID: the external ID
366 * @SystemID: the SYSTEM ID (e.g. filename or URL)
368 * Callback on internal subset declaration.
370 d internalSubsetSAXFunc...
371 d s * based(######typedef######)
374 * externalSubsetSAXFunc:
375 * @ctx: the user data (XML parser context)
376 * @name: the root element name
377 * @ExternalID: the external ID
378 * @SystemID: the SYSTEM ID (e.g. filename or URL)
380 * Callback on external subset declaration.
382 d externalSubsetSAXFunc...
383 d s * based(######typedef######)
387 * @ctx: the user data (XML parser context)
388 * @name: The entity name
390 * Get an entity by name.
392 * Returns the xmlEntityPtr if found.
394 d getEntitySAXFunc...
395 d s * based(######typedef######)
398 * getParameterEntitySAXFunc:
399 * @ctx: the user data (XML parser context)
400 * @name: The entity name
402 * Get a parameter entity by name.
404 * Returns the xmlEntityPtr if found.
406 d getParameterEntitySAXFunc...
407 d s * based(######typedef######)
411 * @ctx: the user data (XML parser context)
412 * @name: the entity name
413 * @type: the entity type
414 * @publicId: The public ID of the entity
415 * @systemId: The system ID of the entity
416 * @content: the entity value (without processing).
418 * An entity definition has been parsed.
420 d entityDeclSAXFunc...
421 d s * based(######typedef######)
424 * notationDeclSAXFunc:
425 * @ctx: the user data (XML parser context)
426 * @name: The name of the notation
427 * @publicId: The public ID of the entity
428 * @systemId: The system ID of the entity
430 * What to do when a notation declaration has been parsed.
432 d notationDeclSAXFunc...
433 d s * based(######typedef######)
436 * attributeDeclSAXFunc:
437 * @ctx: the user data (XML parser context)
438 * @elem: the name of the element
439 * @fullname: the attribute name
440 * @type: the attribute type
441 * @def: the type of default value
442 * @defaultValue: the attribute default value
443 * @tree: the tree of enumerated value set
445 * An attribute definition has been parsed.
447 d attributeDeclSAXFunc...
448 d s * based(######typedef######)
451 * elementDeclSAXFunc:
452 * @ctx: the user data (XML parser context)
453 * @name: the element name
454 * @type: the element type
455 * @content: the element value tree
457 * An element definition has been parsed.
459 d elementDeclSAXFunc...
460 d s * based(######typedef######)
463 * unparsedEntityDeclSAXFunc:
464 * @ctx: the user data (XML parser context)
465 * @name: The name of the entity
466 * @publicId: The public ID of the entity
467 * @systemId: The system ID of the entity
468 * @notationName: the name of the notation
470 * What to do when an unparsed entity declaration is parsed.
472 d unparsedEntityDeclSAXFunc...
473 d s * based(######typedef######)
476 * setDocumentLocatorSAXFunc:
477 * @ctx: the user data (XML parser context)
478 * @loc: A SAX Locator
480 * Receive the document locator at startup, actually xmlDefaultSAXLocator.
481 * Everything is available on the context, so this is useless in our case.
483 d setDocumentLocatorSAXFunc...
484 d s * based(######typedef######)
487 * startDocumentSAXFunc:
488 * @ctx: the user data (XML parser context)
490 * Called when the document start being processed.
492 d startDocumentSAXFunc...
493 d s * based(######typedef######)
496 * endDocumentSAXFunc:
497 * @ctx: the user data (XML parser context)
499 * Called when the document end has been detected.
501 d endDocumentSAXFunc...
502 d s * based(######typedef######)
505 * startElementSAXFunc:
506 * @ctx: the user data (XML parser context)
507 * @name: The element name, including namespace prefix
508 * @atts: An array of name/value attributes pairs, NULL terminated
510 * Called when an opening tag has been processed.
512 d startElementSAXFunc...
513 d s * based(######typedef######)
517 * @ctx: the user data (XML parser context)
518 * @name: The element name
520 * Called when the end of an element has been detected.
522 d endElementSAXFunc...
523 d s * based(######typedef######)
527 * @ctx: the user data (XML parser context)
528 * @name: The attribute name, including namespace prefix
529 * @value: The attribute value
531 * Handle an attribute that has been read by the parser.
532 * The default handling is to convert the attribute into an
533 * DOM subtree and past it in a new xmlAttr element added to
536 d attributeSAXFunc...
537 d s * based(######typedef######)
541 * @ctx: the user data (XML parser context)
542 * @name: The entity name
544 * Called when an entity reference is detected.
546 d referenceSAXFunc...
547 d s * based(######typedef######)
551 * @ctx: the user data (XML parser context)
552 * @ch: a xmlChar string
553 * @len: the number of xmlChar
555 * Receiving some chars from the parser.
557 d charactersSAXFunc...
558 d s * based(######typedef######)
561 * ignorableWhitespaceSAXFunc:
562 * @ctx: the user data (XML parser context)
563 * @ch: a xmlChar string
564 * @len: the number of xmlChar
566 * Receiving some ignorable whitespaces from the parser.
567 * UNUSED: by default the DOM building will use characters.
569 d ignorableWhitespaceSAXFunc...
570 d s * based(######typedef######)
573 * processingInstructionSAXFunc:
574 * @ctx: the user data (XML parser context)
575 * @target: the target name
576 * @data: the PI data's
578 * A processing instruction has been parsed.
580 d processingInstructionSAXFunc...
581 d s * based(######typedef######)
585 * @ctx: the user data (XML parser context)
586 * @value: the comment content
588 * A comment has been parsed.
591 d s * based(######typedef######)
595 * @ctx: the user data (XML parser context)
596 * @value: The pcdata content
597 * @len: the block length
599 * Called when a pcdata block has been parsed.
601 d cdataBlockSAXFunc...
602 d s * based(######typedef######)
606 * @ctx: an XML parser context
607 * @msg: the message to display/transmit
608 * @...: extra parameters for the message display
610 * Display and format a warning messages, callback.
613 d s * based(######typedef######)
617 * @ctx: an XML parser context
618 * @msg: the message to display/transmit
619 * @...: extra parameters for the message display
621 * Display and format an error messages, callback.
624 d s * based(######typedef######)
628 * @ctx: an XML parser context
629 * @msg: the message to display/transmit
630 * @...: extra parameters for the message display
632 * Display and format fatal error messages, callback.
633 * Note: so far fatalError() SAX callbacks are not used, error()
634 * get all the callbacks for errors.
636 d fatalErrorSAXFunc...
637 d s * based(######typedef######)
640 * isStandaloneSAXFunc:
641 * @ctx: the user data (XML parser context)
643 * Is this document tagged standalone?
647 d isStandaloneSAXFunc...
648 d s * based(######typedef######)
651 * hasInternalSubsetSAXFunc:
652 * @ctx: the user data (XML parser context)
654 * Does this document has an internal subset.
658 d hasInternalSubsetSAXFunc...
659 d s * based(######typedef######)
662 * hasExternalSubsetSAXFunc:
663 * @ctx: the user data (XML parser context)
665 * Does this document has an external subset?
669 d hasExternalSubsetSAXFunc...
670 d s * based(######typedef######)
673 ************************************************************************
675 * The SAX version 2 API extensions *
677 ************************************************************************
681 * Special constant found in SAX2 blocks initialized fields
683 d XML_SAX2_MAGIC c X'DEEDBEAF'
685 * startElementNsSAX2Func:
686 * @ctx: the user data (XML parser context)
687 * @localname: the local name of the element
688 * @prefix: the element namespace prefix if available
689 * @URI: the element namespace name if available
690 * @nb_namespaces: number of namespace definitions on that node
691 * @namespaces: pointer to the array of prefix/URI pairs namespace
693 * @nb_attributes: the number of attributes on that node
694 * @nb_defaulted: the number of defaulted attributes. The defaulted
695 * ones are at the end of the array
696 * @attributes: pointer to the array of
697 * (localname/prefix/URI/value/end) attribute values.
699 * SAX2 callback when an element start has been detected by the parser.
700 * It provides the namespace informations for the element, as well as
701 * the new namespace declarations on the element.
703 d startElementNsSAX2Func...
704 d s * based(######typedef######)
707 * endElementNsSAX2Func:
708 * @ctx: the user data (XML parser context)
709 * @localname: the local name of the element
710 * @prefix: the element namespace prefix if available
711 * @URI: the element namespace name if available
713 * SAX2 callback when an element end has been detected by the parser.
714 * It provides the namespace informations for the element.
716 d endElementNsSAX2Func...
717 d s * based(######typedef######)
720 d xmlSAXHandler ds based(xmlSAXHandlerPtr)
723 d like(internalSubsetSAXFunc)
724 d isStandalone like(isStandaloneSAXFunc)
725 d hasInternalSubset...
726 d like(hasInternalSubsetSAXFunc)
727 d hasExternalSubset...
728 d like(hasExternalSubsetSAXFunc)
729 d resolveEntity like(resolveEntitySAXFunc)
730 d getEntity like(getEntitySAXFunc)
731 d entityDecl like(entityDeclSAXFunc)
732 d notationDecl like(notationDeclSAXFunc)
733 d attributeDecl like(attributeDeclSAXFunc)
734 d elementDecl like(elementDeclSAXFunc)
735 d unparsedEntityDecl...
736 d like(unparsedEntityDeclSAXFunc)
737 d setDocumentLocator...
738 d like(setDocumentLocatorSAXFunc)
739 d startDocument like(startDocumentSAXFunc)
740 d endDocument like(endDocumentSAXFunc)
741 d startElement like(startElementSAXFunc)
742 d endElement like(endElementSAXFunc)
743 d reference like(referenceSAXFunc)
744 d characters like(charactersSAXFunc)
745 d ignorableWhitespace...
746 d like(ignorableWhitespaceSAXFunc)
747 d processingInstruction...
748 d like(processingInstructionSAXFunc)
749 d comment like(commentSAXFunc)
750 d warning like(warningSAXFunc)
751 d error like(errorSAXFunc)
752 d fatalError like(fatalErrorSAXFunc)
753 d getParameterEntity...
754 d like(getParameterEntitySAXFunc)
755 d cdataBlock like(cdataBlockSAXFunc)
757 d like(externalSubsetSAXFunc)
760 * The following fields are extensions available only on version 2
764 d like(startElementNsSAX2Func)
765 d endELementNs like(endElementNsSAX2Func)
766 d serror like(xmlStructuredErrorFunc)
770 d xmlSAXHandlerV1Ptr...
771 d s * based(######typedef######)
774 d ds based(xmlSAXHandlerV1Ptr)
777 d like(internalSubsetSAXFunc)
778 d isStandalone like(isStandaloneSAXFunc)
779 d hasInternalSubset...
780 d like(hasInternalSubsetSAXFunc)
781 d hasExternalSubset...
782 d like(hasExternalSubsetSAXFunc)
783 d resolveEntity like(resolveEntitySAXFunc)
784 d getEntity like(getEntitySAXFunc)
785 d entityDecl like(entityDeclSAXFunc)
786 d notationDecl like(notationDeclSAXFunc)
787 d attributeDecl like(attributeDeclSAXFunc)
788 d elementDecl like(elementDeclSAXFunc)
789 d unparsedEntityDecl...
790 d like(unparsedEntityDeclSAXFunc)
791 d setDocumentLocator...
792 d like(setDocumentLocatorSAXFunc)
793 d startDocument like(startDocumentSAXFunc)
794 d endDocument like(endDocumentSAXFunc)
795 d startElement like(startElementSAXFunc)
796 d endElement like(endElementSAXFunc)
797 d reference like(referenceSAXFunc)
798 d characters like(charactersSAXFunc)
799 d ignorableWhitespace...
800 d like(ignorableWhitespaceSAXFunc)
801 d processingInstruction...
802 d like(processingInstructionSAXFunc)
803 d comment like(commentSAXFunc)
804 d warning like(warningSAXFunc)
805 d error like(errorSAXFunc)
806 d fatalError like(fatalErrorSAXFunc)
807 d getParameterEntity...
808 d like(getParameterEntitySAXFunc)
809 d cdataBlock like(cdataBlockSAXFunc)
811 d like(externalSubsetSAXFunc)
814 * xmlExternalEntityLoader:
815 * @URL: The System ID of the resource requested
816 * @ID: The Public ID of the resource requested
817 * @context: the XML parser context
819 * External entity loaders types.
821 * Returns the entity input parser.
823 d xmlExternalEntityLoader...
824 d s * based(######typedef######)
827 /include "libxmlrpg/encoding"
828 /include "libxmlrpg/xmlIO"
829 /include "libxmlrpg/globals"
833 d xmlInitParser pr extproc('xmlInitParser')
835 d xmlCleanupParser...
836 d pr extproc('xmlCleanupParser')
840 d xmlParserInputRead...
841 d pr 10i 0 extproc('xmlParserInputRead')
842 d in value like(xmlParserInputPtr)
845 d xmlParserInputGrow...
846 d pr 10i 0 extproc('xmlParserInputGrow')
847 d in value like(xmlParserInputPtr)
850 * Basic parsing Interfaces
852 /if defined(LIBXML_SAX1_ENABLED)
853 d xmlParseDoc pr extproc('xmlParseDoc')
855 d cur * value options(*string) const xmlChar *
857 d xmlParseFile pr extproc('xmlParseFile')
859 d filename * value options(*string) const char *
861 d xmlParseMemory pr extproc('xmlParseMemory')
863 d buffer * value options(*string) const char *
865 /endif LIBXML_SAX1_ENABLED
867 d xmlSubstituteEntitiesDefault...
869 d 'xmlSubstituteEntitiesDefault')
872 d xmlKeepBlanksDefault...
873 d pr 10i 0 extproc('xmlKeepBlanksDefault')
876 d xmlStopParser pr extproc('xmlStopParser')
877 d ctxt value like(xmlParserCtxtPtr)
879 d xmlPedanticParserDefault...
880 d pr 10i 0 extproc('xmlPedanticParserDefault')
883 d xmlLineNumbersDefault...
884 d pr 10i 0 extproc('xmlLineNumbersDefault')
887 /if defined(LIBXML_SAX1_ENABLED)
890 d xmlRecoverDoc pr extproc('xmlRecoverDoc')
892 d cur * value options(*string) const xmlChar *
894 d xmlRecoverMemory...
895 d pr extproc('xmlRecoverMemory')
897 d buffer * value options(*string) const char *
900 d xmlRecoverFile pr extproc('xmlRecoverFile')
902 d filename * value options(*string) const char *
903 /endif LIBXML_SAX1_ENABLED
905 * Less common routines and SAX interfaces
907 d xmlParseDocument...
908 d pr 10i 0 extproc('xmlParseDocument')
909 d ctxt value like(xmlParserCtxtPtr)
911 d xmlParseExtParsedEnt...
912 d pr 10i 0 extproc('xmlParseExtParsedEnt')
913 d ctxt value like(xmlParserCtxtPtr)
915 /if defined(LIBXML_SAX1_ENABLED)
916 d xmlSAXUserParseFile...
917 d pr 10i 0 extproc('xmlSAXUserParseFile')
918 d sax value like(xmlSAXHandlerPtr)
919 d user_data * value void *
920 d filename * value options(*string) const char *
922 d xmlSAXUserParseMemory...
923 d pr 10i 0 extproc('xmlSAXUserParseMemory')
924 d sax value like(xmlSAXHandlerPtr)
925 d user_data * value void *
926 d buffer * value options(*string) const char *
929 d xmlSAXParseDoc pr extproc('xmlSAXParseDoc')
931 d sax value like(xmlSAXHandlerPtr)
932 d cur * value options(*string) const xmlChar *
933 d recovery 10i 0 value
935 d xmlSAXParseMemory...
936 d pr extproc('xmlSAXParseMemory')
938 d sax value like(xmlSAXHandlerPtr)
939 d buffer * value options(*string) const char *
941 d recovery 10i 0 value
943 d xmlSAXParseMemoryWithData...
944 d pr extproc('xmlSAXParseMemoryWithData')
946 d sax value like(xmlSAXHandlerPtr)
947 d buffer * value options(*string) const char *
949 d recovery 10i 0 value
950 d data * value void *
953 d pr extproc('xmlSAXParseFile')
955 d sax value like(xmlSAXHandlerPtr)
956 d filename * value options(*string) const char *
957 d recovery 10i 0 value
959 d xmlSAXParseFileWithData...
960 d pr extproc('xmlSAXParseFileWithData')
962 d sax value like(xmlSAXHandlerPtr)
963 d filename * value options(*string) const char *
964 d recovery 10i 0 value
965 d data * value void *
967 d xmlSAXParseEntity...
968 d pr extproc('xmlSAXParseEntity')
970 d sax value like(xmlSAXHandlerPtr)
971 d filename * value options(*string) const char *
974 d pr extproc('xmlParseEntity')
976 d filename * value options(*string) const char *
977 /endif LIBXML_SAX1_ENABLED
979 /if defined(LIBXML_VALID_ENABLED)
980 d xmlSAXParseDTD pr extproc('xmlSAXParseDTD')
982 d sax value like(xmlSAXHandlerPtr)
983 d ExternalID * value options(*string) const xmlChar *
984 d SystemID * value options(*string) const xmlChar *
986 d xmlParseDTD pr extproc('xmlParseDTD')
988 d ExternalID * value options(*string) const xmlChar *
989 d SystemID * value options(*string) const xmlChar *
991 d xmlIOParseDTD pr extproc('xmlIOParseDTD')
993 d sax value like(xmlSAXHandlerPtr)
994 d input value like(xmlParserInputBufferPtr)
995 d enc value like(xmlCharEncoding)
996 /endif LIBXML_VALID_ENABLED
998 /if defined(LIBXML_SAX1_ENABLED)
999 d xmlParseBalancedChunkMemory...
1001 d 'xmlParseBalancedChunkMemory')
1002 d doc value like(xmlDocPtr)
1003 d sax value like(xmlSAXHandlerPtr)
1004 d user_data * value void *
1006 d user_data * value void *
1007 d string * value options(*string) const xmlChar *
1008 d lst * value xmlNodePtr *
1009 /endif LIBXML_SAX1_ENABLED
1011 d xmlParseInNodeContext...
1012 d pr extproc('xmlParseInNodeContext')
1013 d like(xmlParserErrors)
1014 d node value like(xmlNodePtr)
1015 d data * value options(*string) const char *
1016 d datalen 10i 0 value
1017 d options 10i 0 value
1018 d lst * value xmlNodePtr *
1020 /if defined(LIBXML_SAX1_ENABLED)
1021 d xmlParseBalancedChunkMemoryRecover...
1023 d 'xmlParseBalancedChunkMemoryRecover')
1024 d doc value like(xmlDocPtr)
1025 d sax value like(xmlSAXHandlerPtr)
1026 d user_data * value void *
1028 d string * value options(*string) const xmlChar *
1029 d lst * value xmlNodePtr *
1030 d recover 10i 0 value
1032 d xmlParseExternalEntity...
1033 d pr 10i 0 extproc('xmlParseExternalEntity')
1034 d doc value like(xmlDocPtr)
1035 d sax value like(xmlSAXHandlerPtr)
1036 d user_data * value void *
1038 d URL * value options(*string) const xmlChar *
1039 d ID * value options(*string) const xmlChar *
1040 d lst * value xmlNodePtr *
1041 /endif LIBXML_SAX1_ENABLED
1043 d xmlParseCtxtExternalEntity...
1044 d pr 10i 0 extproc('xmlParseCtxtExternalEntity')
1045 d sax value like(xmlSAXHandlerPtr)
1046 d URL * value options(*string) const xmlChar *
1047 d ID * value options(*string) const xmlChar *
1048 d lst * value xmlNodePtr *
1050 * Parser contexts handling.
1052 d xmlNewParserCtxt...
1053 d pr extproc('xmlNewParserCtxt')
1054 d like(xmlParserCtxtPtr)
1056 d xmlInitParserCtxt...
1057 d pr 10i 0 extproc('xmlInitParserCtxt')
1058 d ctxt value like(xmlParserCtxtPtr)
1060 d xmlClearParserCtxt...
1061 d pr extproc('xmlClearParserCtxt')
1062 d ctxt value like(xmlParserCtxtPtr)
1064 d xmlFreeParserCtxt...
1065 d pr extproc('xmlFreeParserCtxt')
1066 d ctxt value like(xmlParserCtxtPtr)
1068 /if defined(LIBXML_SAX1_ENABLED)
1069 d xmlSetupParserForBuffer...
1070 d pr extproc('xmlSetupParserForBuffer')
1071 d ctxt value like(xmlParserCtxtPtr)
1072 d buffer * value options(*string) const xmlChar *
1073 d filename * value options(*string) const char *
1074 /endif LIBXML_SAX1_ENABLED
1076 d xmlCreateDocParserCtxt...
1077 d pr extproc('xmlCreateDocParserCtxt')
1078 d like(xmlParserCtxtPtr)
1079 d cur * value options(*string) const xmlChar *
1081 /if defined(LIBXML_LEGACY_ENABLED)
1082 * Reading/setting optional parsing features.
1084 d xmlGetFeaturesList...
1085 d pr 10i 0 extproc('xmlGetFeaturesList')
1087 d result * const char *(*)
1089 d xmlGetFeature pr 10i 0 extproc('xmlGetFeature')
1090 d ctxt value like(xmlParserCtxtPtr)
1091 d name * value options(*string) const char *
1092 d result * value void *
1094 d xmlSetFeature pr 10i 0 extproc('xmlSetFeature')
1095 d ctxt value like(xmlParserCtxtPtr)
1096 d name * value options(*string) const char *
1097 d result * value void *
1098 /endif LIBXML_LEGACY_ENABLD
1100 /if defined(LIBXML_PUSH_ENABLED)
1101 * Interfaces for the Push mode.
1103 d xmlCreatePushParserCtxt...
1104 d pr extproc('xmlCreatePushParserCtxt')
1105 d like(xmlParserCtxtPtr)
1106 d sax value like(xmlSAXHandlerPtr)
1107 d user_data * value void *
1108 d chunk * value options(*string) const char *
1110 d filename * value options(*string) const char *
1112 d xmlParseChunk pr 10i 0 extproc('xmlParseChunk')
1113 d ctxt value like(xmlParserCtxtPtr)
1114 d chunk * value options(*string) const char *
1116 d terminate 10i 0 value
1117 /endif LIBXML_PUSH_ENABLED
1121 d xmlCreateIOParserCtxt...
1122 d pr extproc('xmlCreateIOParserCtxt')
1123 d like(xmlParserCtxtPtr)
1124 d sax value like(xmlSAXHandlerPtr)
1125 d user_data * value void *
1126 d ioread value like(xmlInputReadCallback)
1127 d ioclose value like(xmlInputCloseCallback)
1128 d ioctx * value void *
1129 d enc value like(xmlCharEncoding)
1131 d xmlNewIOInputStream...
1132 d pr extproc('xmlNewIOInputStream')
1133 d like(xmlParserInputPtr)
1134 d ctxt value like(xmlParserCtxtPtr)
1135 d input value like(xmlParserInputBufferPtr)
1136 d enc value like(xmlCharEncoding)
1140 d xmlParserFindNodeInfo...
1141 d pr * extproc('xmlParserFindNodeInfo') xmlParserNodeInfo *
1142 d ctxt value like(xmlParserCtxtPtr)
1143 d node value like(xmlNodePtr) const
1145 d xmlInitNodeInfoSeq...
1146 d pr extproc('xmlInitNodeInfoSeq')
1147 d seq value like(xmlParserNodeInfoSeqPtr)
1149 d xmlClearNodeInfoSeq...
1150 d pr extproc('xmlClearNodeInfoSeq')
1151 d seq value like(xmlParserNodeInfoSeqPtr)
1153 d xmlParserFindNodeInfoIndex...
1154 d pr 20u 0 extproc('xmlParserFindNodeInfoIndex')
1155 d seq value like(xmlParserNodeInfoSeqPtr)
1156 d node value like(xmlNodePtr) const
1158 d xmlParserAddNodeInfo...
1159 d pr extproc('xmlParserAddNodeInfo')
1160 d ctxt value like(xmlParserCtxtPtr)
1161 d info value like(xmlParserNodeInfoPtr) const
1163 * External entities handling actually implemented in xmlIO.
1165 d xmlSetExternalEntityLoader...
1166 d pr extproc('xmlSetExternalEntityLoader')
1167 d f value like(xmlExternalEntityLoader)
1169 d xmlGetExternalEntityLoader...
1170 d pr extproc('xmlGetExternalEntityLoader')
1171 d like(xmlExternalEntityLoader)
1173 d xmlLoadExternalEntity...
1174 d pr extproc('xmlLoadExternalEntity')
1175 d like(xmlParserInputPtr)
1176 d URL * value options(*string) const char *
1177 d ID * value options(*string) const char *
1178 d ctxt value like(xmlParserCtxtPtr)
1180 * Index lookup, actually implemented in the encoding module
1182 d xmlByteConsumed...
1183 d pr 20i 0 extproc('xmlByteConsumed')
1184 d ctxt value like(xmlParserCtxtPtr)
1186 * New set of simpler/more flexible APIs
1190 * This is the set of XML parser options that can be passed down
1191 * to the xmlReadDoc() and similar calls.
1193 d xmlParserOption...
1194 d s 10i 0 based(######typedef######) enum
1195 d XML_PARSE_RECOVER... Recover on errors
1197 d XML_PARSE_NOENT... Substitute entities
1199 d XML_PARSE_DTDLOAD... Load external subset
1201 d XML_PARSE_DTDATTR... Default DTD attrs
1203 d XML_PARSE_DTDVALID... Validate with DTD
1205 d XML_PARSE_NOERROR... Suppress err reports
1207 d XML_PARSE_NOWARNING... Suppr warn reports
1209 d XML_PARSE_PEDANTIC... Pedantic err report
1211 d XML_PARSE_NOBLANKS... Remove blank nodes
1213 d XML_PARSE_SAX1... Use SAX1 internally
1215 d XML_PARSE_XINCLUDE... Impl XInclude subst
1217 d XML_PARSE_NONET... Forbid netwrk access
1219 d XML_PARSE_NODICT... No contxt dict reuse
1221 d XML_PARSE_NSCLEAN... Rmv redndnt ns decls
1223 d XML_PARSE_NOCDATA... CDATA as text nodes
1225 d XML_PARSE_NOXINCNODE... No XINCL START/END
1227 d XML_PARSE_COMPACT... Compact text nodes
1229 d XML_PARSE_OLD10... B4 upd5 compatible
1231 d XML_PARSE_NOBASEFIX... No XINC xml:base fix
1233 d XML_PARSE_HUGE... No parsing limit
1235 d XML_PARSE_OLDSAX... Use SAX2 b4 2.7.0
1237 d XML_PARSE_IGNORE_ENC... No int doc code hint
1239 d XML_PARSE_BIG_LINES... Big line#-->PSVI fld
1242 d xmlCtxtReset pr extproc('xmlCtxtReset')
1243 d ctxt value like(xmlParserCtxtPtr)
1245 d xmlCtxtResetPush...
1246 d pr 10i 0 extproc('xmlCtxtResetPush')
1247 d ctxt value like(xmlParserCtxtPtr)
1248 d chunk * value options(*string) const char *
1250 d filename * value options(*string) const char *
1251 d encoding * value options(*string) const char *
1253 d xmlCtxtUseOptions...
1254 d pr 10i 0 extproc('xmlCtxtUseOptions')
1255 d ctxt value like(xmlParserCtxtPtr)
1256 d options 10i 0 value
1258 d xmlReadDoc pr extproc('xmlReadDoc')
1260 d cur * value options(*string) const xmlChar *
1261 d URL * value options(*string) const char *
1262 d encoding * value options(*string) const char *
1263 d options 10i 0 value
1265 d xmlReadFile pr extproc('xmlReadFile')
1267 d URL * value options(*string) const char *
1268 d encoding * value options(*string) const char *
1269 d options 10i 0 value
1271 d xmlReadMemory pr extproc('xmlReadMemory')
1273 d buffer * value options(*string) const char *
1275 d URL * value options(*string) const char *
1276 d encoding * value options(*string) const char *
1277 d options 10i 0 value
1279 d xmlReadFd pr extproc('xmlReadFd')
1282 d URL * value options(*string) const char *
1283 d encoding * value options(*string) const char *
1284 d options 10i 0 value
1286 d xmlReadIO pr extproc('xmlReadIO')
1288 d ioread value like(xmlInputReadCallback)
1289 d ioclose value like(xmlInputCloseCallback)
1290 d ioctx * value void *
1291 d URL * value options(*string) const char *
1292 d encoding * value options(*string) const char *
1293 d options 10i 0 value
1295 d xmlCtxtReadDoc pr extproc('xmlCtxtReadDoc')
1297 d ctxt value like(xmlParserCtxtPtr)
1298 d cur * value options(*string) const xmlChar *
1299 d URL * value options(*string) const char *
1300 d encoding * value options(*string) const char *
1301 d options 10i 0 value
1303 d xmlCtxtReadFile...
1304 d pr extproc('xmlCtxtReadFile')
1306 d ctxt value like(xmlParserCtxtPtr)
1307 d filename * value options(*string) const char *
1308 d encoding * value options(*string) const char *
1309 d options 10i 0 value
1311 d xmlCtxtReadMemory...
1312 d pr extproc('xmlCtxtReadMemory')
1314 d ctxt value like(xmlParserCtxtPtr)
1315 d buffer * value options(*string) const char *
1317 d URL * value options(*string) const char *
1318 d encoding * value options(*string) const char *
1319 d options 10i 0 value
1321 d xmlCtxtReadFd pr extproc('xmlCtxtReadFd')
1323 d ctxt value like(xmlParserCtxtPtr)
1325 d URL * value options(*string) const char *
1326 d encoding * value options(*string) const char *
1327 d options 10i 0 value
1329 d xmlCtxtReadIO pr extproc('xmlCtxtReadIO')
1331 d ctxt value like(xmlParserCtxtPtr)
1332 d ioread value like(xmlInputReadCallback)
1333 d ioclose value like(xmlInputCloseCallback)
1334 d ioctx * value void *
1335 d URL * value options(*string) const char *
1336 d encoding * value options(*string) const char *
1337 d options 10i 0 value
1339 * Library wide options
1343 * Used to examine the existance of features that can be enabled
1344 * or disabled at compile-time.
1345 * They used to be called XML_FEATURE_xxx but this clashed with Expat
1347 d xmlFeature s 10i 0 based(######typedef######) enum
1348 d XML_WITH_THREAD...
1351 d XML_WITH_OUTPUT...
1354 d XML_WITH_READER...
1356 d XML_WITH_PATTERN...
1358 d XML_WITH_WRITER...
1362 d XML_WITH_HTTP c 10
1365 d XML_WITH_HTML c 12
1366 d XML_WITH_LEGACY...
1368 d XML_WITH_C14N c 14
1369 d XML_WITH_CATALOG...
1373 d XML_WITH_XPTR c 17
1374 d XML_WITH_XINCLUDE...
1378 d XML_WITH_ISO8859X...
1380 d XML_WITH_UNICODE...
1382 d XML_WITH_REGEXP...
1384 d XML_WITH_AUTOMATA...
1386 d XML_WITH_EXPR c 24
1387 d XML_WITH_SCHEMAS...
1389 d XML_WITH_SCHEMATRON...
1391 d XML_WITH_MODULES...
1395 d XML_WITH_DEBUG_MEM...
1397 d XML_WITH_DEBUG_RUN...
1399 d XML_WITH_ZLIB c 31
1401 d XML_WITH_LZMA c 33
1402 d XML_WITH_NONE c 99999
1404 d xmlHasFeature pr 10i 0 extproc('xmlHasFeature')
1405 d feature value like(xmlFeature)
1407 /endif XML_PARSER_H__