亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? testsax.c

?? xml開源解析代碼.版本為libxml2-2.6.29,可支持GB3212.網絡消息發送XML時很有用.
?? C
?? 第 1 頁 / 共 2 頁
字號:
/** * startElementDebug: * @ctxt:  An XML parser context * @name:  The element name * * called when an opening tag has been processed. */static voidstartElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar **atts){    int i;    callbacks++;    if (quiet)	return;    fprintf(stdout, "SAX.startElement(%s", (char *) name);    if (atts != NULL) {        for (i = 0;(atts[i] != NULL);i++) {	    fprintf(stdout, ", %s='", atts[i++]);	    if (atts[i] != NULL)	        fprintf(stdout, "%s'", atts[i]);	}    }    fprintf(stdout, ")\n");}/** * endElementDebug: * @ctxt:  An XML parser context * @name:  The element name * * called when the end of an element has been detected. */static voidendElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name){    callbacks++;    if (quiet)	return;    fprintf(stdout, "SAX.endElement(%s)\n", (char *) name);}/** * charactersDebug: * @ctxt:  An XML parser context * @ch:  a xmlChar string * @len: the number of xmlChar * * receiving some chars from the parser. * Question: how much at a time ??? */static voidcharactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len){    char output[40];    int i;    callbacks++;    if (quiet)	return;    for (i = 0;(i<len) && (i < 30);i++)	output[i] = ch[i];    output[i] = 0;    fprintf(stdout, "SAX.characters(%s, %d)\n", output, len);}/** * referenceDebug: * @ctxt:  An XML parser context * @name:  The entity name * * called when an entity reference is detected.  */static voidreferenceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name){    callbacks++;    if (quiet)	return;    fprintf(stdout, "SAX.reference(%s)\n", name);}/** * ignorableWhitespaceDebug: * @ctxt:  An XML parser context * @ch:  a xmlChar string * @start: the first char in the string * @len: the number of xmlChar * * receiving some ignorable whitespaces from the parser. * Question: how much at a time ??? */static voidignorableWhitespaceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len){    char output[40];    int i;    callbacks++;    if (quiet)	return;    for (i = 0;(i<len) && (i < 30);i++)	output[i] = ch[i];    output[i] = 0;    fprintf(stdout, "SAX.ignorableWhitespace(%s, %d)\n", output, len);}/** * processingInstructionDebug: * @ctxt:  An XML parser context * @target:  the target name * @data: the PI data's * @len: the number of xmlChar * * A processing instruction has been parsed. */static voidprocessingInstructionDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *target,                      const xmlChar *data){    callbacks++;    if (quiet)	return;    if (data != NULL)	fprintf(stdout, "SAX.processingInstruction(%s, %s)\n",		(char *) target, (char *) data);    else	fprintf(stdout, "SAX.processingInstruction(%s, NULL)\n",		(char *) target);}/** * cdataBlockDebug: * @ctx: the user data (XML parser context) * @value:  The pcdata content * @len:  the block length * * called when a pcdata block has been parsed */static voidcdataBlockDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value, int len){    callbacks++;    if (quiet)	return;    fprintf(stdout, "SAX.pcdata(%.20s, %d)\n",	    (char *) value, len);}/** * commentDebug: * @ctxt:  An XML parser context * @value:  the comment content * * A comment has been parsed. */static voidcommentDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value){    callbacks++;    if (quiet)	return;    fprintf(stdout, "SAX.comment(%s)\n", value);}/** * warningDebug: * @ctxt:  An XML parser context * @msg:  the message to display/transmit * @...:  extra parameters for the message display * * Display and format a warning messages, gives file, line, position and * extra parameters. */static void XMLCDECLwarningDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...){    va_list args;    callbacks++;    if (quiet)	return;    va_start(args, msg);    fprintf(stdout, "SAX.warning: ");    vfprintf(stdout, msg, args);    va_end(args);}/** * errorDebug: * @ctxt:  An XML parser context * @msg:  the message to display/transmit * @...:  extra parameters for the message display * * Display and format a error messages, gives file, line, position and * extra parameters. */static void XMLCDECLerrorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...){    va_list args;    callbacks++;    if (quiet)	return;    va_start(args, msg);    fprintf(stdout, "SAX.error: ");    vfprintf(stdout, msg, args);    va_end(args);}/** * fatalErrorDebug: * @ctxt:  An XML parser context * @msg:  the message to display/transmit * @...:  extra parameters for the message display * * Display and format a fatalError messages, gives file, line, position and * extra parameters. */static void XMLCDECLfatalErrorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...){    va_list args;    callbacks++;    if (quiet)	return;    va_start(args, msg);    fprintf(stdout, "SAX.fatalError: ");    vfprintf(stdout, msg, args);    va_end(args);}static xmlSAXHandler debugSAXHandlerStruct = {    internalSubsetDebug,    isStandaloneDebug,    hasInternalSubsetDebug,    hasExternalSubsetDebug,    resolveEntityDebug,    getEntityDebug,    entityDeclDebug,    notationDeclDebug,    attributeDeclDebug,    elementDeclDebug,    unparsedEntityDeclDebug,    setDocumentLocatorDebug,    startDocumentDebug,    endDocumentDebug,    startElementDebug,    endElementDebug,    referenceDebug,    charactersDebug,    ignorableWhitespaceDebug,    processingInstructionDebug,    commentDebug,    warningDebug,    errorDebug,    fatalErrorDebug,    getParameterEntityDebug,    cdataBlockDebug,    externalSubsetDebug,    1,    NULL,    NULL,    NULL,    NULL};xmlSAXHandlerPtr debugSAXHandler = &debugSAXHandlerStruct;/* * SAX2 specific callbacks *//** * startElementNsDebug: * @ctxt:  An XML parser context * @name:  The element name * * called when an opening tag has been processed. */static voidstartElementNsDebug(void *ctx ATTRIBUTE_UNUSED,                    const xmlChar *localname,                    const xmlChar *prefix,                    const xmlChar *URI,		    int nb_namespaces,		    const xmlChar **namespaces,		    int nb_attributes,		    int nb_defaulted,		    const xmlChar **attributes){    int i;    callbacks++;    if (quiet)	return;    fprintf(stdout, "SAX.startElementNs(%s", (char *) localname);    if (prefix == NULL)	fprintf(stdout, ", NULL");    else	fprintf(stdout, ", %s", (char *) prefix);    if (URI == NULL)	fprintf(stdout, ", NULL");    else	fprintf(stdout, ", '%s'", (char *) URI);    fprintf(stdout, ", %d", nb_namespaces);        if (namespaces != NULL) {        for (i = 0;i < nb_namespaces * 2;i++) {	    fprintf(stdout, ", xmlns");	    if (namespaces[i] != NULL)	        fprintf(stdout, ":%s", namespaces[i]);	    i++;	    fprintf(stdout, "='%s'", namespaces[i]);	}    }    fprintf(stdout, ", %d, %d", nb_attributes, nb_defaulted);    if (attributes != NULL) {        for (i = 0;i < nb_attributes * 5;i += 5) {	    if (attributes[i + 1] != NULL)		fprintf(stdout, ", %s:%s='", attributes[i + 1], attributes[i]);	    else		fprintf(stdout, ", %s='", attributes[i]);	    fprintf(stdout, "%.4s...', %d", attributes[i + 3],		    (int)(attributes[i + 4] - attributes[i + 3]));	}    }    fprintf(stdout, ")\n");}/** * endElementDebug: * @ctxt:  An XML parser context * @name:  The element name * * called when the end of an element has been detected. */static voidendElementNsDebug(void *ctx ATTRIBUTE_UNUSED,                  const xmlChar *localname,                  const xmlChar *prefix,                  const xmlChar *URI){    callbacks++;    if (quiet)	return;    fprintf(stdout, "SAX.endElementNs(%s", (char *) localname);    if (prefix == NULL)	fprintf(stdout, ", NULL");    else	fprintf(stdout, ", %s", (char *) prefix);    if (URI == NULL)	fprintf(stdout, ", NULL)\n");    else	fprintf(stdout, ", '%s')\n", (char *) URI);}static xmlSAXHandler debugSAX2HandlerStruct = {    internalSubsetDebug,    isStandaloneDebug,    hasInternalSubsetDebug,    hasExternalSubsetDebug,    resolveEntityDebug,    getEntityDebug,    entityDeclDebug,    notationDeclDebug,    attributeDeclDebug,    elementDeclDebug,    unparsedEntityDeclDebug,    setDocumentLocatorDebug,    startDocumentDebug,    endDocumentDebug,    NULL,    NULL,    referenceDebug,    charactersDebug,    ignorableWhitespaceDebug,    processingInstructionDebug,    commentDebug,    warningDebug,    errorDebug,    fatalErrorDebug,    getParameterEntityDebug,    cdataBlockDebug,    externalSubsetDebug,    XML_SAX2_MAGIC,    NULL,    startElementNsDebug,    endElementNsDebug,    NULL};static xmlSAXHandlerPtr debugSAX2Handler = &debugSAX2HandlerStruct;/************************************************************************ *									* *				Debug					* *									* ************************************************************************/static voidparseAndPrintFile(char *filename) {    int res;#ifdef LIBXML_PUSH_ENABLED    if (push) {	FILE *f;        if ((!quiet) && (!nonull)) {	    /*	     * Empty callbacks for checking	     */#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)	    f = fopen(filename, "rb");#else	    f = fopen(filename, "r");#endif	    if (f != NULL) {		int ret;		char chars[10];		xmlParserCtxtPtr ctxt;		ret = fread(chars, 1, 4, f);		if (ret > 0) {		    ctxt = xmlCreatePushParserCtxt(emptySAXHandler, NULL,				chars, ret, filename);		    while ((ret = fread(chars, 1, 3, f)) > 0) {			xmlParseChunk(ctxt, chars, ret, 0);		    }		    xmlParseChunk(ctxt, chars, 0, 1);		    xmlFreeParserCtxt(ctxt);		}		fclose(f);	    } else {		xmlGenericError(xmlGenericErrorContext,			"Cannot read file %s\n", filename);	    }	}	/*	 * Debug callback	 */#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)	f = fopen(filename, "rb");#else	f = fopen(filename, "r");#endif	if (f != NULL) {	    int ret;	    char chars[10];	    xmlParserCtxtPtr ctxt;	    ret = fread(chars, 1, 4, f);	    if (ret > 0) {	        if (sax2)		    ctxt = xmlCreatePushParserCtxt(debugSAX2Handler, NULL,				chars, ret, filename);		else		    ctxt = xmlCreatePushParserCtxt(debugSAXHandler, NULL,				chars, ret, filename);		while ((ret = fread(chars, 1, 3, f)) > 0) {		    xmlParseChunk(ctxt, chars, ret, 0);		}		ret = xmlParseChunk(ctxt, chars, 0, 1);		xmlFreeParserCtxt(ctxt);		if (ret != 0) {		    fprintf(stdout,		            "xmlSAXUserParseFile returned error %d\n", ret);		}	    }	    fclose(f);	}    } else {#endif /* LIBXML_PUSH_ENABLED */	if (!speed) {	    /*	     * Empty callbacks for checking	     */	    if ((!quiet) && (!nonull)) {		res = xmlSAXUserParseFile(emptySAXHandler, NULL, filename);		if (res != 0) {		    fprintf(stdout, "xmlSAXUserParseFile returned error %d\n", res);		}	    }	    /*	     * Debug callback	     */	    callbacks = 0;	    if (repeat) {	        int i;		for (i = 0;i < 99;i++) {		    if (sax2)			res = xmlSAXUserParseFile(debugSAX2Handler, NULL,			                          filename);		    else			res = xmlSAXUserParseFile(debugSAXHandler, NULL,			                          filename);		}	    }	    if (sax2)	        res = xmlSAXUserParseFile(debugSAX2Handler, NULL, filename);	    else		res = xmlSAXUserParseFile(debugSAXHandler, NULL, filename);	    if (res != 0) {		fprintf(stdout, "xmlSAXUserParseFile returned error %d\n", res);	    }	    if (quiet)		fprintf(stdout, "%d callbacks generated\n", callbacks);	} else {	    /*	     * test 100x the SAX parse	     */	    int i;	    for (i = 0; i<100;i++)		res = xmlSAXUserParseFile(emptySAXHandler, NULL, filename);	    if (res != 0) {		fprintf(stdout, "xmlSAXUserParseFile returned error %d\n", res);	    }	}#ifdef LIBXML_PUSH_ENABLED    }#endif}int main(int argc, char **argv) {    int i;    int files = 0;    LIBXML_TEST_VERSION	/* be safe, plus calls xmlInitParser */        for (i = 1; i < argc ; i++) {	if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))	    debug++;	else if ((!strcmp(argv[i], "-copy")) || (!strcmp(argv[i], "--copy")))	    copy++;	else if ((!strcmp(argv[i], "-recover")) ||	         (!strcmp(argv[i], "--recover")))	    recovery++;	else if ((!strcmp(argv[i], "-push")) ||	         (!strcmp(argv[i], "--push")))#ifdef LIBXML_PUSH_ENABLED	    push++;#else	    fprintf(stderr,"'push' not enabled in library - ignoring\n");#endif /* LIBXML_PUSH_ENABLED */	else if ((!strcmp(argv[i], "-speed")) ||	         (!strcmp(argv[i], "--speed")))	    speed++;	else if ((!strcmp(argv[i], "-timing")) ||	         (!strcmp(argv[i], "--timing"))) {	    nonull++;	    timing++;	    quiet++;	} else if ((!strcmp(argv[i], "-repeat")) ||	         (!strcmp(argv[i], "--repeat"))) {	    repeat++;	    quiet++;	} else if ((!strcmp(argv[i], "-noent")) ||	         (!strcmp(argv[i], "--noent")))	    noent++;	else if ((!strcmp(argv[i], "-quiet")) ||	         (!strcmp(argv[i], "--quiet")))	    quiet++;	else if ((!strcmp(argv[i], "-sax2")) ||	         (!strcmp(argv[i], "--sax2")))	    sax2++;	else if ((!strcmp(argv[i], "-nonull")) ||	         (!strcmp(argv[i], "--nonull")))	    nonull++;    }    if (noent != 0) xmlSubstituteEntitiesDefault(1);    for (i = 1; i < argc ; i++) {	if (argv[i][0] != '-') {	    if (timing) {		startTimer();	    }	    parseAndPrintFile(argv[i]);	    if (timing) {		endTimer("Parsing");	    }	    files ++;	}    }    xmlCleanupParser();    xmlMemoryDump();    return(0);}#elseint main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {    printf("%s : SAX1 parsing support not compiled in\n", argv[0]);    return(0);}#endif /* LIBXML_SAX1_ENABLED */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产不卡视频一区二区三区| 国产精品女人毛片| 久久午夜电影网| 免费成人美女在线观看.| 在线免费观看日韩欧美| 亚洲免费在线播放| 欧美本精品男人aⅴ天堂| 欧美亚州韩日在线看免费版国语版| 日韩毛片视频在线看| 欧美一级免费观看| 性做久久久久久| 欧美一卡在线观看| 精品在线你懂的| 欧美日韩亚洲综合| 亚洲欧美日韩系列| 欧美久久久一区| 日韩精品视频网| 亚洲色图一区二区| 亚洲私人黄色宅男| 欧美本精品男人aⅴ天堂| 久久精品二区亚洲w码| 欧美精品一区二区在线播放| 欧美精选一区二区| 精品久久久久久久人人人人传媒| 欧美日韩日日骚| 一区二区三区蜜桃网| 久久综合精品国产一区二区三区| 欧美日韩五月天| 亚洲精品在线一区二区| 日韩亚洲欧美一区| proumb性欧美在线观看| 香蕉加勒比综合久久| 日本韩国欧美三级| 亚洲国产色一区| 成人欧美一区二区三区| 欧美日韩美女一区二区| 欧美亚洲免费在线一区| 欧美午夜电影网| 欧美一区二区精品| 色拍拍在线精品视频8848| 欧美日韩亚洲综合一区二区三区| 欧美视频一区二区三区四区| 精品视频在线免费| 91精品国产91久久久久久一区二区 | 26uuu国产日韩综合| 欧美高清在线一区| 亚洲精品少妇30p| 美女在线视频一区| 成人av午夜电影| 久久午夜色播影院免费高清 | 欧美精品第1页| 国产精品一区一区| 亚洲图片欧美色图| 亚洲欧美综合在线精品| 久久久天堂av| 亚洲午夜久久久| 国产精品一线二线三线| 国产精品亲子伦对白| 欧美日韩一区二区三区四区| 欧美性欧美巨大黑白大战| aa级大片欧美| 欧美吞精做爰啪啪高潮| 国产精品一区二区果冻传媒| 波多野结衣精品在线| 欧美人与性动xxxx| 国产精品不卡一区| 老汉av免费一区二区三区| 国产99久久久精品| 欧美电视剧免费全集观看| 国产三级精品三级| 麻豆视频观看网址久久| 91丨九色丨蝌蚪丨老版| 在线观看免费亚洲| 国产亚洲欧美在线| 精品一区二区三区在线视频| 欧美午夜精品理论片a级按摩| 久久一日本道色综合| 日韩国产精品大片| 欧美日韩高清影院| 亚洲成人在线免费| 欧洲视频一区二区| 亚洲综合色成人| 色网站国产精品| 一区二区三区在线观看国产 | 免费视频最近日韩| 91美女福利视频| 亚洲男同1069视频| 色8久久精品久久久久久蜜| 亚洲人成影院在线观看| 91美女精品福利| 性久久久久久久| 3751色影院一区二区三区| 日韩成人av影视| 精品国产乱码久久久久久浪潮| 国产成人免费视频网站高清观看视频| 国产精品99久| 国产日韩欧美麻豆| 色悠悠亚洲一区二区| 亚洲成人精品一区| 久久女同性恋中文字幕| 久久99久久久欧美国产| 国产日产欧美一区二区三区| 成人视屏免费看| 国产欧美日韩亚州综合| 91女厕偷拍女厕偷拍高清| 午夜欧美2019年伦理| 久久尤物电影视频在线观看| av不卡一区二区三区| 日本亚洲三级在线| 欧美成人video| 91视频免费看| 国产成人综合网站| 一区二区三区精品在线| 精品处破学生在线二十三| 一本色道**综合亚洲精品蜜桃冫 | 国产色综合一区| 欧美理论片在线| 91蝌蚪porny| 香蕉久久夜色精品国产使用方法| 日韩欧美国产一区二区三区 | 亚洲成人动漫精品| 综合在线观看色| 国产性天天综合网| 日韩一卡二卡三卡四卡| 欧美性极品少妇| 成人视屏免费看| 国产精品一级二级三级| 精品一区二区在线视频| 免费成人在线观看| 日韩专区一卡二卡| 亚洲第一会所有码转帖| 亚洲卡通动漫在线| 一区二区三区四区激情| 日本一区二区三区电影| 久久这里都是精品| 国产日韩精品一区| 久久精品一区二区三区四区| 精品久久久久一区二区国产| 欧美高清一级片在线| 在线视频观看一区| 国产成人三级在线观看| 成人午夜av在线| 色综合天天视频在线观看| 成人性生交大片免费看在线播放| 国产在线视频精品一区| 国产精品综合久久| 不卡一卡二卡三乱码免费网站| 91视频精品在这里| 91视频91自| 91精品国产综合久久蜜臀| 欧美高清一级片在线| 精品欧美一区二区在线观看| 2020日本不卡一区二区视频| 中文字幕一区二区三区不卡在线 | 在线欧美日韩国产| 91精品国产综合久久精品app | 91精品福利在线| 日韩精品综合一本久道在线视频| 欧美精品一区二区三区在线播放| 国产精品久久影院| 丝袜美腿亚洲综合| av综合在线播放| 日韩欧美亚洲另类制服综合在线| 亚洲精品在线观看视频| 一区二区三区在线视频免费| 极品少妇一区二区| 在线观看日韩毛片| 久久综合久久综合久久| 一区二区三区欧美日| 成人黄色软件下载| 日韩亚洲欧美综合| 亚洲成人免费电影| 91国产成人在线| 中文字幕一区免费在线观看| 免费日本视频一区| 精品国产污网站| 亚洲一区二区3| 91亚洲精华国产精华精华液| 欧美日韩久久一区二区| 亚洲色图欧洲色图| 欧美天堂亚洲电影院在线播放| 亚洲精品视频在线观看免费| 一本大道久久a久久综合| 亚洲免费观看高清完整版在线观看熊 | 日韩免费一区二区| 国产精品系列在线播放| 中文字幕在线观看一区二区| 91网址在线看| 日本不卡视频在线观看| 欧美大肚乱孕交hd孕妇| 美女视频网站久久| 国产精品久久久久久久久免费丝袜| 91小视频在线| 欧美a级一区二区| 国产精品午夜在线| 在线不卡免费欧美| 菠萝蜜视频在线观看一区| 亚洲国产精品一区二区久久 | 91小视频免费看| 乱一区二区av|