|
libxml2
|
Callbacks for SAX parser. More...
#include <parser.h>
Data Fields | |
| internalSubsetSAXFunc | internalSubset |
| Called after the start of the document type declaration was parsed. | |
| isStandaloneSAXFunc | isStandalone |
| Standalone status. | |
| hasInternalSubsetSAXFunc | hasInternalSubset |
| Internal subset availability. | |
| hasExternalSubsetSAXFunc | hasExternalSubset |
| External subset availability. | |
| resolveEntitySAXFunc | resolveEntity |
| Only called when loading external DTDs. | |
| getEntitySAXFunc | getEntity |
| Called when looking up general entities. | |
| entityDeclSAXFunc | entityDecl |
| Called after an entity declaration was parsed. | |
| notationDeclSAXFunc | notationDecl |
| Called after a notation declaration was parsed. | |
| attributeDeclSAXFunc | attributeDecl |
| Called after an attribute declaration was parsed. | |
| elementDeclSAXFunc | elementDecl |
| Called after an element declaration was parsed. | |
| unparsedEntityDeclSAXFunc | unparsedEntityDecl |
| Called after an unparsed entity declaration was parsed. | |
| setDocumentLocatorSAXFunc | setDocumentLocator |
| This callback receives the "document locator" at startup, which is always the global xmlDefaultSAXLocator. | |
| startDocumentSAXFunc | startDocument |
| Called after the XML declaration was parsed. | |
| endDocumentSAXFunc | endDocument |
| Called at the end of the document. | |
| startElementSAXFunc | startElement |
| Legacy start tag handler. | |
| endElementSAXFunc | endElement |
| See _xmlSAXHandler.startElement. | |
| referenceSAXFunc | reference |
| Called after an entity reference was parsed. | |
| charactersSAXFunc | characters |
| Called after a character data was parsed. | |
| ignorableWhitespaceSAXFunc | ignorableWhitespace |
| Called after "ignorable" whitespace was parsed. | |
| processingInstructionSAXFunc | processingInstruction |
| Called after a processing instruction was parsed. | |
| commentSAXFunc | comment |
| Called after a comment was parsed. | |
| warningSAXFunc | warning |
| Callback for warning messages. | |
| errorSAXFunc | error |
| Callback for error messages. | |
| fatalErrorSAXFunc | fatalError |
| Unused, all errors go to error. | |
| getParameterEntitySAXFunc | getParameterEntity |
| Called when looking up parameter entities. | |
| cdataBlockSAXFunc | cdataBlock |
| Called after a CDATA section was parsed. | |
| externalSubsetSAXFunc | externalSubset |
| Called to parse the external subset. | |
| unsigned int | initialized |
| Legacy magic value. | |
| void * | _private |
| Application data. | |
| startElementNsSAX2Func | startElementNs |
| Called after a start tag was parsed. | |
| endElementNsSAX2Func | endElementNs |
| Called after an end tag was parsed. | |
| xmlStructuredErrorFunc | serror |
| Structured error handler. | |
Callbacks for SAX parser.
For DTD-related handlers, it's recommended to either use the original libxml2 handler or set them to NULL if DTDs can be ignored.
| attributeDeclSAXFunc attributeDecl |
Called after an attribute declaration was parsed.
Should typically not be modified.
| elementDeclSAXFunc elementDecl |
Called after an element declaration was parsed.
Should typically not be modified.
| entityDeclSAXFunc entityDecl |
Called after an entity declaration was parsed.
Should typically not be modified.
| externalSubsetSAXFunc externalSubset |
Called to parse the external subset.
Should typically not be modified.
| getEntitySAXFunc getEntity |
Called when looking up general entities.
Should typically not be modified.
| getParameterEntitySAXFunc getParameterEntity |
Called when looking up parameter entities.
Should typically not be modified.
| hasExternalSubsetSAXFunc hasExternalSubset |
External subset availability.
Not invoked by the parser. Not supposed to be changed by applications.
| hasInternalSubsetSAXFunc hasInternalSubset |
Internal subset availability.
Not invoked by the parser. Not supposed to be changed by applications.
| ignorableWhitespaceSAXFunc ignorableWhitespace |
Called after "ignorable" whitespace was parsed.
ignorableWhitespace should always be set to the same value as characters. Otherwise, the parser will try to detect whitespace which is unreliable.
| unsigned int initialized |
Legacy magic value.
initialized should always be set to XML_SAX2_MAGIC to enable the modern SAX2 interface.
| internalSubsetSAXFunc internalSubset |
Called after the start of the document type declaration was parsed.
Should typically not be modified.
| isStandaloneSAXFunc isStandalone |
Standalone status.
Not invoked by the parser. Not supposed to be changed by applications.
| notationDeclSAXFunc notationDecl |
Called after a notation declaration was parsed.
Should typically not be modified.
| resolveEntitySAXFunc resolveEntity |
Only called when loading external DTDs.
Not called to load external entities.
Should typically not be modified.
| xmlStructuredErrorFunc serror |
Structured error handler.
Takes precedence over error or warning, but modern code should use xmlCtxtSetErrorHandler().
| setDocumentLocatorSAXFunc setDocumentLocator |
This callback receives the "document locator" at startup, which is always the global xmlDefaultSAXLocator.
Everything is available on the context, so this is useless in our case.
| startDocumentSAXFunc startDocument |
Called after the XML declaration was parsed.
Use xmlCtxtGetVersion(), xmlCtxtGetDeclaredEncoding() and xmlCtxtGetStandalone() to get data from the XML declaration.
| startElementSAXFunc startElement |
Legacy start tag handler.
startElement and endElement are only used by the legacy SAX1 interface and should not be used in new software. If you really have to enable SAX1, the preferred way is set the initialized member to 1 instead of XML_SAX2_MAGIC.
For backward compatibility, it's also possible to set the startElementNs and endElementNs handlers to NULL.
You can also set the XML_PARSE_SAX1 parser option, but versions older than 2.12.0 will probably crash if this option is provided together with custom SAX callbacks.
| unparsedEntityDeclSAXFunc unparsedEntityDecl |
Called after an unparsed entity declaration was parsed.
Should typically not be modified.