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

📄 parser.h

📁 xml开源解析代码.版本为libxml2-2.6.29,可支持GB3212.网络消息发送XML时很有用.
💻 H
📖 第 1 页 / 共 3 页
字号:
 */XMLPUBFUN int XMLCALL				xmlParserInputRead	(xmlParserInputPtr in,					 int len);XMLPUBFUN int XMLCALL				xmlParserInputGrow	(xmlParserInputPtr in,					 int len);/* * Basic parsing Interfaces */#ifdef LIBXML_SAX1_ENABLEDXMLPUBFUN xmlDocPtr XMLCALL			xmlParseDoc		(const xmlChar *cur);XMLPUBFUN xmlDocPtr XMLCALL			xmlParseFile		(const char *filename);XMLPUBFUN xmlDocPtr XMLCALL			xmlParseMemory		(const char *buffer,					 int size);#endif /* LIBXML_SAX1_ENABLED */XMLPUBFUN int XMLCALL				xmlSubstituteEntitiesDefault(int val);XMLPUBFUN int XMLCALL				xmlKeepBlanksDefault	(int val);XMLPUBFUN void XMLCALL				xmlStopParser		(xmlParserCtxtPtr ctxt);XMLPUBFUN int XMLCALL				xmlPedanticParserDefault(int val);XMLPUBFUN int XMLCALL				xmlLineNumbersDefault	(int val);#ifdef LIBXML_SAX1_ENABLED/* * Recovery mode  */XMLPUBFUN xmlDocPtr XMLCALL			xmlRecoverDoc		(xmlChar *cur);XMLPUBFUN xmlDocPtr XMLCALL			xmlRecoverMemory	(const char *buffer,					 int size);XMLPUBFUN xmlDocPtr XMLCALL			xmlRecoverFile		(const char *filename);#endif /* LIBXML_SAX1_ENABLED *//* * Less common routines and SAX interfaces */XMLPUBFUN int XMLCALL				xmlParseDocument	(xmlParserCtxtPtr ctxt);XMLPUBFUN int XMLCALL				xmlParseExtParsedEnt	(xmlParserCtxtPtr ctxt);#ifdef LIBXML_SAX1_ENABLEDXMLPUBFUN int XMLCALL				xmlSAXUserParseFile	(xmlSAXHandlerPtr sax,					 void *user_data,					 const char *filename);XMLPUBFUN int XMLCALL				xmlSAXUserParseMemory	(xmlSAXHandlerPtr sax,					 void *user_data,					 const char *buffer,					 int size);XMLPUBFUN xmlDocPtr XMLCALL			xmlSAXParseDoc		(xmlSAXHandlerPtr sax,					 const xmlChar *cur,					 int recovery);XMLPUBFUN xmlDocPtr XMLCALL			xmlSAXParseMemory	(xmlSAXHandlerPtr sax,					 const char *buffer,                                   	 int size,					 int recovery);XMLPUBFUN xmlDocPtr XMLCALL			xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,					 const char *buffer,                                   	 int size,					 int recovery,					 void *data);XMLPUBFUN xmlDocPtr XMLCALL			xmlSAXParseFile		(xmlSAXHandlerPtr sax,					 const char *filename,					 int recovery);XMLPUBFUN xmlDocPtr XMLCALL			xmlSAXParseFileWithData	(xmlSAXHandlerPtr sax,					 const char *filename,					 int recovery,					 void *data);XMLPUBFUN xmlDocPtr XMLCALL			xmlSAXParseEntity	(xmlSAXHandlerPtr sax,					 const char *filename);XMLPUBFUN xmlDocPtr XMLCALL			xmlParseEntity		(const char *filename);#endif /* LIBXML_SAX1_ENABLED */#ifdef LIBXML_VALID_ENABLEDXMLPUBFUN xmlDtdPtr XMLCALL			xmlSAXParseDTD		(xmlSAXHandlerPtr sax,					 const xmlChar *ExternalID,					 const xmlChar *SystemID);XMLPUBFUN xmlDtdPtr XMLCALL			xmlParseDTD		(const xmlChar *ExternalID,					 const xmlChar *SystemID);XMLPUBFUN xmlDtdPtr XMLCALL			xmlIOParseDTD		(xmlSAXHandlerPtr sax,					 xmlParserInputBufferPtr input,					 xmlCharEncoding enc);#endif /* LIBXML_VALID_ENABLE */#ifdef LIBXML_SAX1_ENABLEDXMLPUBFUN int XMLCALL			xmlParseBalancedChunkMemory(xmlDocPtr doc,					 xmlSAXHandlerPtr sax,					 void *user_data,					 int depth,					 const xmlChar *string,					 xmlNodePtr *lst);#endif /* LIBXML_SAX1_ENABLED */XMLPUBFUN xmlParserErrors XMLCALL		xmlParseInNodeContext	(xmlNodePtr node,					 const char *data,					 int datalen,					 int options,					 xmlNodePtr *lst);#ifdef LIBXML_SAX1_ENABLEDXMLPUBFUN int XMLCALL          		xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,                     xmlSAXHandlerPtr sax,                     void *user_data,                     int depth,                     const xmlChar *string,                     xmlNodePtr *lst,                     int recover);XMLPUBFUN int XMLCALL				xmlParseExternalEntity	(xmlDocPtr doc,					 xmlSAXHandlerPtr sax,					 void *user_data,					 int depth,					 const xmlChar *URL,					 const xmlChar *ID,					 xmlNodePtr *lst);#endif /* LIBXML_SAX1_ENABLED */XMLPUBFUN int XMLCALL				xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,					 const xmlChar *URL,					 const xmlChar *ID,					 xmlNodePtr *lst);/* * Parser contexts handling. */XMLPUBFUN xmlParserCtxtPtr XMLCALL			xmlNewParserCtxt	(void);XMLPUBFUN int XMLCALL				xmlInitParserCtxt	(xmlParserCtxtPtr ctxt);XMLPUBFUN void XMLCALL				xmlClearParserCtxt	(xmlParserCtxtPtr ctxt);XMLPUBFUN void XMLCALL				xmlFreeParserCtxt	(xmlParserCtxtPtr ctxt);#ifdef LIBXML_SAX1_ENABLEDXMLPUBFUN void XMLCALL				xmlSetupParserForBuffer	(xmlParserCtxtPtr ctxt,					 const xmlChar* buffer,					 const char *filename);#endif /* LIBXML_SAX1_ENABLED */XMLPUBFUN xmlParserCtxtPtr XMLCALL 		xmlCreateDocParserCtxt	(const xmlChar *cur);#ifdef LIBXML_LEGACY_ENABLED/* * Reading/setting optional parsing features. */XMLPUBFUN int XMLCALL				xmlGetFeaturesList	(int *len,					 const char **result);XMLPUBFUN int XMLCALL				xmlGetFeature		(xmlParserCtxtPtr ctxt,					 const char *name,					 void *result);XMLPUBFUN int XMLCALL				xmlSetFeature		(xmlParserCtxtPtr ctxt,					 const char *name,					 void *value);#endif /* LIBXML_LEGACY_ENABLED */#ifdef LIBXML_PUSH_ENABLED/* * Interfaces for the Push mode. */XMLPUBFUN xmlParserCtxtPtr XMLCALL 		xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,					 void *user_data,					 const char *chunk,					 int size,					 const char *filename);XMLPUBFUN int XMLCALL		 		xmlParseChunk		(xmlParserCtxtPtr ctxt,					 const char *chunk,					 int size,					 int terminate);#endif /* LIBXML_PUSH_ENABLED *//* * Special I/O mode. */XMLPUBFUN xmlParserCtxtPtr XMLCALL 		xmlCreateIOParserCtxt	(xmlSAXHandlerPtr sax,					 void *user_data,					 xmlInputReadCallback   ioread,					 xmlInputCloseCallback  ioclose,					 void *ioctx,					 xmlCharEncoding enc);XMLPUBFUN xmlParserInputPtr XMLCALL 		xmlNewIOInputStream	(xmlParserCtxtPtr ctxt,					 xmlParserInputBufferPtr input,					 xmlCharEncoding enc);/* * Node infos. */XMLPUBFUN const xmlParserNodeInfo* XMLCALL		xmlParserFindNodeInfo	(const xmlParserCtxtPtr ctxt,				         const xmlNodePtr node);XMLPUBFUN void XMLCALL				xmlInitNodeInfoSeq	(xmlParserNodeInfoSeqPtr seq);XMLPUBFUN void XMLCALL				xmlClearNodeInfoSeq	(xmlParserNodeInfoSeqPtr seq);XMLPUBFUN unsigned long XMLCALL 		xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,                                         const xmlNodePtr node);XMLPUBFUN void XMLCALL				xmlParserAddNodeInfo	(xmlParserCtxtPtr ctxt,					 const xmlParserNodeInfoPtr info);/* * External entities handling actually implemented in xmlIO. */XMLPUBFUN void XMLCALL				xmlSetExternalEntityLoader(xmlExternalEntityLoader f);XMLPUBFUN xmlExternalEntityLoader XMLCALL		xmlGetExternalEntityLoader(void);XMLPUBFUN xmlParserInputPtr XMLCALL		xmlLoadExternalEntity	(const char *URL,					 const char *ID,					 xmlParserCtxtPtr ctxt);/* * Index lookup, actually implemented in the encoding module */XMLPUBFUN long XMLCALL		xmlByteConsumed		(xmlParserCtxtPtr ctxt);/* * New set of simpler/more flexible APIs *//** * xmlParserOption: * * This is the set of XML parser options that can be passed down * to the xmlReadDoc() and similar calls. */typedef enum {    XML_PARSE_RECOVER	= 1<<0,	/* recover on errors */    XML_PARSE_NOENT	= 1<<1,	/* substitute entities */    XML_PARSE_DTDLOAD	= 1<<2,	/* load the external subset */    XML_PARSE_DTDATTR	= 1<<3,	/* default DTD attributes */    XML_PARSE_DTDVALID	= 1<<4,	/* validate with the DTD */    XML_PARSE_NOERROR	= 1<<5,	/* suppress error reports */    XML_PARSE_NOWARNING	= 1<<6,	/* suppress warning reports */    XML_PARSE_PEDANTIC	= 1<<7,	/* pedantic error reporting */    XML_PARSE_NOBLANKS	= 1<<8,	/* remove blank nodes */    XML_PARSE_SAX1	= 1<<9,	/* use the SAX1 interface internally */    XML_PARSE_XINCLUDE	= 1<<10,/* Implement XInclude substitition  */    XML_PARSE_NONET	= 1<<11,/* Forbid network access */    XML_PARSE_NODICT	= 1<<12,/* Do not reuse the context dictionnary */    XML_PARSE_NSCLEAN	= 1<<13,/* remove redundant namespaces declarations */    XML_PARSE_NOCDATA	= 1<<14,/* merge CDATA as text nodes */    XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */    XML_PARSE_COMPACT   = 1<<16 /* compact small text nodes; no modification of                                   the tree allowed afterwards (will possibly				   crash if you try to modify the tree) */} xmlParserOption;XMLPUBFUN void XMLCALL		xmlCtxtReset		(xmlParserCtxtPtr ctxt);XMLPUBFUN int XMLCALL		xmlCtxtResetPush	(xmlParserCtxtPtr ctxt,					 const char *chunk,					 int size,					 const char *filename,					 const char *encoding);XMLPUBFUN int XMLCALL		xmlCtxtUseOptions	(xmlParserCtxtPtr ctxt,					 int options);XMLPUBFUN xmlDocPtr XMLCALL		xmlReadDoc		(const xmlChar *cur,					 const char *URL,					 const char *encoding,					 int options);XMLPUBFUN xmlDocPtr XMLCALL		xmlReadFile		(const char *URL,					 const char *encoding,					 int options);XMLPUBFUN xmlDocPtr XMLCALL		xmlReadMemory		(const char *buffer,					 int size,					 const char *URL,					 const char *encoding,					 int options);XMLPUBFUN xmlDocPtr XMLCALL		xmlReadFd		(int fd,					 const char *URL,					 const char *encoding,					 int options);XMLPUBFUN xmlDocPtr XMLCALL		xmlReadIO		(xmlInputReadCallback ioread,					 xmlInputCloseCallback ioclose,					 void *ioctx,					 const char *URL,					 const char *encoding,					 int options);XMLPUBFUN xmlDocPtr XMLCALL		xmlCtxtReadDoc		(xmlParserCtxtPtr ctxt,					 const xmlChar *cur,					 const char *URL,					 const char *encoding,					 int options);XMLPUBFUN xmlDocPtr XMLCALL		xmlCtxtReadFile		(xmlParserCtxtPtr ctxt,					 const char *filename,					 const char *encoding,					 int options);XMLPUBFUN xmlDocPtr XMLCALL		xmlCtxtReadMemory		(xmlParserCtxtPtr ctxt,					 const char *buffer,					 int size,					 const char *URL,					 const char *encoding,					 int options);XMLPUBFUN xmlDocPtr XMLCALL		xmlCtxtReadFd		(xmlParserCtxtPtr ctxt,					 int fd,					 const char *URL,					 const char *encoding,					 int options);XMLPUBFUN xmlDocPtr XMLCALL		xmlCtxtReadIO		(xmlParserCtxtPtr ctxt,					 xmlInputReadCallback ioread,					 xmlInputCloseCallback ioclose,					 void *ioctx,					 const char *URL,					 const char *encoding,					 int options);/* * Library wide options *//** * xmlFeature: * * Used to examine the existance of features that can be enabled * or disabled at compile-time. * They used to be called XML_FEATURE_xxx but this clashed with Expat */typedef enum {    XML_WITH_THREAD = 1,    XML_WITH_TREE = 2,    XML_WITH_OUTPUT = 3,    XML_WITH_PUSH = 4,    XML_WITH_READER = 5,    XML_WITH_PATTERN = 6,    XML_WITH_WRITER = 7,    XML_WITH_SAX1 = 8,    XML_WITH_FTP = 9,    XML_WITH_HTTP = 10,    XML_WITH_VALID = 11,    XML_WITH_HTML = 12,    XML_WITH_LEGACY = 13,    XML_WITH_C14N = 14,    XML_WITH_CATALOG = 15,    XML_WITH_XPATH = 16,    XML_WITH_XPTR = 17,    XML_WITH_XINCLUDE = 18,    XML_WITH_ICONV = 19,    XML_WITH_ISO8859X = 20,    XML_WITH_UNICODE = 21,    XML_WITH_REGEXP = 22,    XML_WITH_AUTOMATA = 23,    XML_WITH_EXPR = 24,    XML_WITH_SCHEMAS = 25,    XML_WITH_SCHEMATRON = 26,    XML_WITH_MODULES = 27,    XML_WITH_DEBUG = 28,    XML_WITH_DEBUG_MEM = 29,    XML_WITH_DEBUG_RUN = 30,    XML_WITH_ZLIB = 31,    XML_WITH_NONE = 99999 /* just to be sure of allocation size */} xmlFeature;XMLPUBFUN int XMLCALL		xmlHasFeature		(xmlFeature feature);#ifdef __cplusplus}#endif#endif /* __XML_PARSER_H__ */

⌨️ 快捷键说明

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