⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 parser.h.svn-base

📁 这是一个用于解析xml文件的类库。使用这个类库
💻 SVN-BASE
📖 第 1 页 / 共 3 页
字号:
 * @content: the entity value (without processing). * * An entity definition has been parsed. */typedef void (*entityDeclSAXFunc) (void *ctx,				const xmlChar *name,				int type,				const xmlChar *publicId,				const xmlChar *systemId,				xmlChar *content);/** * notationDeclSAXFunc: * @ctx:  the user data (XML parser context) * @name: The name of the notation * @publicId: The public ID of the entity * @systemId: The system ID of the entity * * What to do when a notation declaration has been parsed. */typedef void (*notationDeclSAXFunc)(void *ctx,				const xmlChar *name,				const xmlChar *publicId,				const xmlChar *systemId);/** * attributeDeclSAXFunc: * @ctx:  the user data (XML parser context) * @elem:  the name of the element * @fullname:  the attribute name  * @type:  the attribute type  * @def:  the type of default value * @defaultValue: the attribute default value * @tree:  the tree of enumerated value set * * An attribute definition has been parsed. */typedef void (*attributeDeclSAXFunc)(void *ctx,				const xmlChar *elem,				const xmlChar *fullname,				int type,				int def,				const xmlChar *defaultValue,				xmlEnumerationPtr tree);/** * elementDeclSAXFunc: * @ctx:  the user data (XML parser context) * @name:  the element name  * @type:  the element type  * @content: the element value tree * * An element definition has been parsed. */typedef void (*elementDeclSAXFunc)(void *ctx,				const xmlChar *name,				int type,				xmlElementContentPtr content);/** * unparsedEntityDeclSAXFunc: * @ctx:  the user data (XML parser context) * @name: The name of the entity * @publicId: The public ID of the entity * @systemId: The system ID of the entity * @notationName: the name of the notation * * What to do when an unparsed entity declaration is parsed. */typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,				const xmlChar *name,				const xmlChar *publicId,				const xmlChar *systemId,				const xmlChar *notationName);/** * setDocumentLocatorSAXFunc: * @ctx:  the user data (XML parser context) * @loc: A SAX Locator * * Receive the document locator at startup, actually xmlDefaultSAXLocator. * Everything is available on the context, so this is useless in our case. */typedef void (*setDocumentLocatorSAXFunc) (void *ctx,				xmlSAXLocatorPtr loc);/** * startDocumentSAXFunc: * @ctx:  the user data (XML parser context) * * Called when the document start being processed. */typedef void (*startDocumentSAXFunc) (void *ctx);/** * endDocumentSAXFunc: * @ctx:  the user data (XML parser context) * * Called when the document end has been detected. */typedef void (*endDocumentSAXFunc) (void *ctx);/** * startElementSAXFunc: * @ctx:  the user data (XML parser context) * @name:  The element name, including namespace prefix * @atts:  An array of name/value attributes pairs, NULL terminated * * Called when an opening tag has been processed. */typedef void (*startElementSAXFunc) (void *ctx,				const xmlChar *name,				const xmlChar **atts);/** * endElementSAXFunc: * @ctx:  the user data (XML parser context) * @name:  The element name * * Called when the end of an element has been detected. */typedef void (*endElementSAXFunc) (void *ctx,				const xmlChar *name);/** * attributeSAXFunc: * @ctx:  the user data (XML parser context) * @name:  The attribute name, including namespace prefix * @value:  The attribute value * * Handle an attribute that has been read by the parser. * The default handling is to convert the attribute into an * DOM subtree and past it in a new xmlAttr element added to * the element. */typedef void (*attributeSAXFunc) (void *ctx,				const xmlChar *name,				const xmlChar *value);/** * referenceSAXFunc: * @ctx:  the user data (XML parser context) * @name:  The entity name * * Called when an entity reference is detected.  */typedef void (*referenceSAXFunc) (void *ctx,				const xmlChar *name);/** * charactersSAXFunc: * @ctx:  the user data (XML parser context) * @ch:  a xmlChar string * @len: the number of xmlChar * * Receiving some chars from the parser. */typedef void (*charactersSAXFunc) (void *ctx,				const xmlChar *ch,				int len);/** * ignorableWhitespaceSAXFunc: * @ctx:  the user data (XML parser context) * @ch:  a xmlChar string * @len: the number of xmlChar * * Receiving some ignorable whitespaces from the parser. * UNUSED: by default the DOM building will use characters. */typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,				const xmlChar *ch,				int len);/** * processingInstructionSAXFunc: * @ctx:  the user data (XML parser context) * @target:  the target name * @data: the PI data's * * A processing instruction has been parsed. */typedef void (*processingInstructionSAXFunc) (void *ctx,				const xmlChar *target,				const xmlChar *data);/** * commentSAXFunc: * @ctx:  the user data (XML parser context) * @value:  the comment content * * A comment has been parsed. */typedef void (*commentSAXFunc) (void *ctx,				const xmlChar *value);/** * cdataBlockSAXFunc: * @ctx:  the user data (XML parser context) * @value:  The pcdata content * @len:  the block length * * Called when a pcdata block has been parsed. */typedef void (*cdataBlockSAXFunc) (	                        void *ctx,				const xmlChar *value,				int len);/** * warningSAXFunc: * @ctx:  an XML parser context * @msg:  the message to display/transmit * @...:  extra parameters for the message display *  * Display and format a warning messages, callback. */typedef void (*warningSAXFunc) (void *ctx,				const char *msg, ...);/** * errorSAXFunc: * @ctx:  an XML parser context * @msg:  the message to display/transmit * @...:  extra parameters for the message display *  * Display and format an error messages, callback. */typedef void (*errorSAXFunc) (void *ctx,				const char *msg, ...);/** * fatalErrorSAXFunc: * @ctx:  an XML parser context * @msg:  the message to display/transmit * @...:  extra parameters for the message display *  * Display and format fatal error messages, callback. * Note: so far fatalError() SAX callbacks are not used, error() *       get all the callbacks for errors. */typedef void (*fatalErrorSAXFunc) (void *ctx,				const char *msg, ...);/** * isStandaloneSAXFunc: * @ctx:  the user data (XML parser context) * * Is this document tagged standalone? * * Returns 1 if true */typedef int (*isStandaloneSAXFunc) (void *ctx);/** * hasInternalSubsetSAXFunc: * @ctx:  the user data (XML parser context) * * Does this document has an internal subset. * * Returns 1 if true */typedef int (*hasInternalSubsetSAXFunc) (void *ctx);/** * hasExternalSubsetSAXFunc: * @ctx:  the user data (XML parser context) * * Does this document has an external subset? * * Returns 1 if true */typedef int (*hasExternalSubsetSAXFunc) (void *ctx);/************************************************************************ *									* *			The SAX version 2 API extensions		* *									* ************************************************************************//** * XML_SAX2_MAGIC: * * Special constant found in SAX2 blocks initialized fields */#define XML_SAX2_MAGIC 0xDEEDBEAF/** * startElementNsSAX2Func: * @ctx:  the user data (XML parser context) * @localname:  the local name of the element * @prefix:  the element namespace prefix if available * @URI:  the element namespace name if available * @nb_namespaces:  number of namespace definitions on that node * @namespaces:  pointer to the array of prefix/URI pairs namespace definitions * @nb_attributes:  the number of attributes on that node * @nb_defaulted:  the number of defaulted attributes. The defaulted *                  ones are at the end of the array * @attributes:  pointer to the array of (localname/prefix/URI/value/end) *               attribute values. * * SAX2 callback when an element start has been detected by the parser. * It provides the namespace informations for the element, as well as * the new namespace declarations on the element. */typedef void (*startElementNsSAX2Func) (void *ctx,					const xmlChar *localname,					const xmlChar *prefix,					const xmlChar *URI,					int nb_namespaces,					const xmlChar **namespaces,					int nb_attributes,					int nb_defaulted,					const xmlChar **attributes); /** * endElementNsSAX2Func: * @ctx:  the user data (XML parser context) * @localname:  the local name of the element * @prefix:  the element namespace prefix if available * @URI:  the element namespace name if available * * SAX2 callback when an element end has been detected by the parser. * It provides the namespace informations for the element. */typedef void (*endElementNsSAX2Func)   (void *ctx,					const xmlChar *localname,					const xmlChar *prefix,					const xmlChar *URI);struct _xmlSAXHandler {    internalSubsetSAXFunc internalSubset;    isStandaloneSAXFunc isStandalone;    hasInternalSubsetSAXFunc hasInternalSubset;    hasExternalSubsetSAXFunc hasExternalSubset;    resolveEntitySAXFunc resolveEntity;    getEntitySAXFunc getEntity;    entityDeclSAXFunc entityDecl;    notationDeclSAXFunc notationDecl;    attributeDeclSAXFunc attributeDecl;    elementDeclSAXFunc elementDecl;    unparsedEntityDeclSAXFunc unparsedEntityDecl;    setDocumentLocatorSAXFunc setDocumentLocator;    startDocumentSAXFunc startDocument;    endDocumentSAXFunc endDocument;    startElementSAXFunc startElement;    endElementSAXFunc endElement;    referenceSAXFunc reference;    charactersSAXFunc characters;    ignorableWhitespaceSAXFunc ignorableWhitespace;    processingInstructionSAXFunc processingInstruction;    commentSAXFunc comment;    warningSAXFunc warning;    errorSAXFunc error;    fatalErrorSAXFunc fatalError; /* unused error() get all the errors */    getParameterEntitySAXFunc getParameterEntity;    cdataBlockSAXFunc cdataBlock;    externalSubsetSAXFunc externalSubset;    unsigned int initialized;    /* The following fields are extensions available only on version 2 */    void *_private;    startElementNsSAX2Func startElementNs;    endElementNsSAX2Func endElementNs;    xmlStructuredErrorFunc serror;};/* * SAX Version 1 */typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr;struct _xmlSAXHandlerV1 {    internalSubsetSAXFunc internalSubset;    isStandaloneSAXFunc isStandalone;    hasInternalSubsetSAXFunc hasInternalSubset;    hasExternalSubsetSAXFunc hasExternalSubset;    resolveEntitySAXFunc resolveEntity;    getEntitySAXFunc getEntity;    entityDeclSAXFunc entityDecl;    notationDeclSAXFunc notationDecl;    attributeDeclSAXFunc attributeDecl;    elementDeclSAXFunc elementDecl;    unparsedEntityDeclSAXFunc unparsedEntityDecl;    setDocumentLocatorSAXFunc setDocumentLocator;    startDocumentSAXFunc startDocument;    endDocumentSAXFunc endDocument;    startElementSAXFunc startElement;    endElementSAXFunc endElement;    referenceSAXFunc reference;    charactersSAXFunc characters;    ignorableWhitespaceSAXFunc ignorableWhitespace;    processingInstructionSAXFunc processingInstruction;    commentSAXFunc comment;    warningSAXFunc warning;    errorSAXFunc error;    fatalErrorSAXFunc fatalError; /* unused error() get all the errors */    getParameterEntitySAXFunc getParameterEntity;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -