mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
doc: Document SAX handlers a little more
This commit is contained in:
@@ -879,18 +879,23 @@ typedef void (*endElementNsSAX2Func) (void *ctx,
|
|||||||
|
|
||||||
|
|
||||||
struct _xmlSAXHandler {
|
struct _xmlSAXHandler {
|
||||||
internalSubsetSAXFunc internalSubset;
|
/*
|
||||||
isStandaloneSAXFunc isStandalone;
|
* For DTD-related handlers, it's recommended to either use the
|
||||||
hasInternalSubsetSAXFunc hasInternalSubset;
|
* original libxml2 handler or set them to NULL if DTDs can be
|
||||||
hasExternalSubsetSAXFunc hasExternalSubset;
|
* ignored.
|
||||||
resolveEntitySAXFunc resolveEntity;
|
*/
|
||||||
getEntitySAXFunc getEntity;
|
internalSubsetSAXFunc internalSubset; /* DTD */
|
||||||
entityDeclSAXFunc entityDecl;
|
isStandaloneSAXFunc isStandalone; /* unused */
|
||||||
notationDeclSAXFunc notationDecl;
|
hasInternalSubsetSAXFunc hasInternalSubset; /* DTD */
|
||||||
attributeDeclSAXFunc attributeDecl;
|
hasExternalSubsetSAXFunc hasExternalSubset; /* DTD */
|
||||||
elementDeclSAXFunc elementDecl;
|
resolveEntitySAXFunc resolveEntity; /* DTD */
|
||||||
unparsedEntityDeclSAXFunc unparsedEntityDecl;
|
getEntitySAXFunc getEntity; /* DTD */
|
||||||
setDocumentLocatorSAXFunc setDocumentLocator;
|
entityDeclSAXFunc entityDecl; /* DTD */
|
||||||
|
notationDeclSAXFunc notationDecl; /* DTD */
|
||||||
|
attributeDeclSAXFunc attributeDecl; /* DTD */
|
||||||
|
elementDeclSAXFunc elementDecl; /* DTD */
|
||||||
|
unparsedEntityDeclSAXFunc unparsedEntityDecl; /* DTD */
|
||||||
|
setDocumentLocatorSAXFunc setDocumentLocator; /* deprecated */
|
||||||
startDocumentSAXFunc startDocument;
|
startDocumentSAXFunc startDocument;
|
||||||
endDocumentSAXFunc endDocument;
|
endDocumentSAXFunc endDocument;
|
||||||
/*
|
/*
|
||||||
@@ -910,15 +915,20 @@ struct _xmlSAXHandler {
|
|||||||
endElementSAXFunc endElement;
|
endElementSAXFunc endElement;
|
||||||
referenceSAXFunc reference;
|
referenceSAXFunc reference;
|
||||||
charactersSAXFunc characters;
|
charactersSAXFunc characters;
|
||||||
|
/*
|
||||||
|
* `ignorableWhitespace` should always be set to the same value
|
||||||
|
* as `characters`. Otherwise, the parser will try to detect
|
||||||
|
* whitespace which is unreliable.
|
||||||
|
*/
|
||||||
ignorableWhitespaceSAXFunc ignorableWhitespace;
|
ignorableWhitespaceSAXFunc ignorableWhitespace;
|
||||||
processingInstructionSAXFunc processingInstruction;
|
processingInstructionSAXFunc processingInstruction;
|
||||||
commentSAXFunc comment;
|
commentSAXFunc comment;
|
||||||
warningSAXFunc warning;
|
warningSAXFunc warning;
|
||||||
errorSAXFunc error;
|
errorSAXFunc error;
|
||||||
fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
|
fatalErrorSAXFunc fatalError; /* unused, `error` gets all the errors */
|
||||||
getParameterEntitySAXFunc getParameterEntity;
|
getParameterEntitySAXFunc getParameterEntity; /* DTD */
|
||||||
cdataBlockSAXFunc cdataBlock;
|
cdataBlockSAXFunc cdataBlock;
|
||||||
externalSubsetSAXFunc externalSubset;
|
externalSubsetSAXFunc externalSubset; /* DTD */
|
||||||
/*
|
/*
|
||||||
* `initialized` should always be set to XML_SAX2_MAGIC to enable the
|
* `initialized` should always be set to XML_SAX2_MAGIC to enable the
|
||||||
* modern SAX2 interface.
|
* modern SAX2 interface.
|
||||||
@@ -930,6 +940,10 @@ struct _xmlSAXHandler {
|
|||||||
void *_private;
|
void *_private;
|
||||||
startElementNsSAX2Func startElementNs;
|
startElementNsSAX2Func startElementNs;
|
||||||
endElementNsSAX2Func endElementNs;
|
endElementNsSAX2Func endElementNs;
|
||||||
|
/*
|
||||||
|
* Takes precedence over `error` or `warning`, but modern code
|
||||||
|
* should use xmlCtxtSetErrorHandler.
|
||||||
|
*/
|
||||||
xmlStructuredErrorFunc serror;
|
xmlStructuredErrorFunc serror;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user