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

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

?? tinyxmlparser.cpp

?? tinyxml project for Visual Studio 2008. A small xml parser, the result is lib file for embedded ARM
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
							 TiXmlEncoding encoding ){	assert( p );	assert( tag );	if ( !p || !*p )	{		assert( 0 );		return false;	}	const char* q = p;	if ( ignoreCase )	{		while ( *q && *tag && ToLower( *q, encoding ) == ToLower( *tag, encoding ) )		{			++q;			++tag;		}		if ( *tag == 0 )			return true;	}	else	{		while ( *q && *tag && *q == *tag )		{			++q;			++tag;		}		if ( *tag == 0 )		// Have we found the end of the tag, and everything equal?			return true;	}	return false;}const char* TiXmlBase::ReadText(	const char* p, 									TIXML_STRING * text, 									bool trimWhiteSpace, 									const char* endTag, 									bool caseInsensitive,									TiXmlEncoding encoding ){    *text = "";	if (    !trimWhiteSpace			// certain tags always keep whitespace		 || !condenseWhiteSpace )	// if true, whitespace is always kept	{		// Keep all the white space.		while (	   p && *p				&& !StringEqual( p, endTag, caseInsensitive, encoding )			  )		{			int len;			char cArr[4] = { 0, 0, 0, 0 };			p = GetChar( p, cArr, &len, encoding );			text->append( cArr, len );		}	}	else	{		bool whitespace = false;		// Remove leading white space:		p = SkipWhiteSpace( p, encoding );		while (	   p && *p				&& !StringEqual( p, endTag, caseInsensitive, encoding ) )		{			if ( *p == '\r' || *p == '\n' )			{				whitespace = true;				++p;			}			else if ( IsWhiteSpace( *p ) )			{				whitespace = true;				++p;			}			else			{				// If we've found whitespace, add it before the				// new character. Any whitespace just becomes a space.				if ( whitespace )				{					(*text) += ' ';					whitespace = false;				}				int len;				char cArr[4] = { 0, 0, 0, 0 };				p = GetChar( p, cArr, &len, encoding );				if ( len == 1 )					(*text) += cArr[0];	// more efficient				else					text->append( cArr, len );			}		}	}	if ( p ) 		p += strlen( endTag );	return p;}#ifdef TIXML_USE_STLvoid TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag ){	// The basic issue with a document is that we don't know what we're	// streaming. Read something presumed to be a tag (and hope), then	// identify it, and call the appropriate stream method on the tag.	//	// This "pre-streaming" will never read the closing ">" so the	// sub-tag can orient itself.	if ( !StreamTo( in, '<', tag ) ) 	{		SetError( TIXML_ERROR_PARSING_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );		return;	}	while ( in->good() )	{		int tagIndex = (int) tag->length();		while ( in->good() && in->peek() != '>' )		{			int c = in->get();			if ( c <= 0 )			{				SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );				break;			}			(*tag) += (char) c;		}		if ( in->good() )		{			// We now have something we presume to be a node of 			// some sort. Identify it, and call the node to			// continue streaming.			TiXmlNode* node = Identify( tag->c_str() + tagIndex, TIXML_DEFAULT_ENCODING );			if ( node )			{				node->StreamIn( in, tag );				bool isElement = node->ToElement() != 0;				delete node;				node = 0;				// If this is the root element, we're done. Parsing will be				// done by the >> operator.				if ( isElement )				{					return;				}			}			else			{				SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN );				return;			}		}	}	// We should have returned sooner.	SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN );}#endifconst char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiXmlEncoding encoding ){	ClearError();	// Parse away, at the document level. Since a document	// contains nothing but other tags, most of what happens	// here is skipping white space.	if ( !p || !*p )	{		SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );		return 0;	}	// Note that, for a document, this needs to come	// before the while space skip, so that parsing	// starts from the pointer we are given.	location.Clear();	if ( prevData )	{		location.row = prevData->cursor.row;		location.col = prevData->cursor.col;	}	else	{		location.row = 0;		location.col = 0;	}	TiXmlParsingData data( p, TabSize(), location.row, location.col );	location = data.Cursor();	if ( encoding == TIXML_ENCODING_UNKNOWN )	{		// Check for the Microsoft UTF-8 lead bytes.		const unsigned char* pU = (const unsigned char*)p;		if (	*(pU+0) && *(pU+0) == TIXML_UTF_LEAD_0			 && *(pU+1) && *(pU+1) == TIXML_UTF_LEAD_1			 && *(pU+2) && *(pU+2) == TIXML_UTF_LEAD_2 )		{			encoding = TIXML_ENCODING_UTF8;			useMicrosoftBOM = true;		}	}    p = SkipWhiteSpace( p, encoding );	if ( !p )	{		SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );		return 0;	}	while ( p && *p )	{		TiXmlNode* node = Identify( p, encoding );		if ( node )		{			p = node->Parse( p, &data, encoding );			LinkEndChild( node );		}		else		{			break;		}		// Did we get encoding info?		if (    encoding == TIXML_ENCODING_UNKNOWN			 && node->ToDeclaration() )		{			TiXmlDeclaration* dec = node->ToDeclaration();			const char* enc = dec->Encoding();			assert( enc );			if ( *enc == 0 )				encoding = TIXML_ENCODING_UTF8;			else if ( StringEqual( enc, "UTF-8", true, TIXML_ENCODING_UNKNOWN ) )				encoding = TIXML_ENCODING_UTF8;			else if ( StringEqual( enc, "UTF8", true, TIXML_ENCODING_UNKNOWN ) )				encoding = TIXML_ENCODING_UTF8;	// incorrect, but be nice			else 				encoding = TIXML_ENCODING_LEGACY;		}		p = SkipWhiteSpace( p, encoding );	}	// Was this empty?	if ( !firstChild ) {		SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, encoding );		return 0;	}	// All is well.	return p;}void TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding ){		// The first error in a chain is more accurate - don't set again!	if ( error )		return;	assert( err > 0 && err < TIXML_ERROR_STRING_COUNT );	error   = true;	errorId = err;	errorDesc = errorString[ errorId ];	errorLocation.Clear();	if ( pError && data )	{		data->Stamp( pError, encoding );		errorLocation = data->Cursor();	}}TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding ){	TiXmlNode* returnNode = 0;	p = SkipWhiteSpace( p, encoding );	if( !p || !*p || *p != '<' )	{		return 0;	}	TiXmlDocument* doc = GetDocument();	p = SkipWhiteSpace( p, encoding );	if ( !p || !*p )	{		return 0;	}	// What is this thing? 	// - Elements start with a letter or underscore, but xml is reserved.	// - Comments: <!--	// - Decleration: <?xml	// - Everthing else is unknown to tinyxml.	//	const char* xmlHeader = { "<?xml" };	const char* commentHeader = { "<!--" };	const char* dtdHeader = { "<!" };	const char* cdataHeader = { "<![CDATA[" };	if ( StringEqual( p, xmlHeader, true, encoding ) )	{		#ifdef DEBUG_PARSER			TIXML_LOG( "XML parsing Declaration\n" );		#endif		returnNode = new TiXmlDeclaration();	}	else if ( StringEqual( p, commentHeader, false, encoding ) )	{		#ifdef DEBUG_PARSER			TIXML_LOG( "XML parsing Comment\n" );		#endif		returnNode = new TiXmlComment();	}	else if ( StringEqual( p, cdataHeader, false, encoding ) )	{		#ifdef DEBUG_PARSER			TIXML_LOG( "XML parsing CDATA\n" );		#endif		TiXmlText* text = new TiXmlText( "" );		text->SetCDATA( true );		returnNode = text;	}	else if ( StringEqual( p, dtdHeader, false, encoding ) )	{		#ifdef DEBUG_PARSER			TIXML_LOG( "XML parsing Unknown(1)\n" );		#endif		returnNode = new TiXmlUnknown();	}	else if (    IsAlpha( *(p+1), encoding )			  || *(p+1) == '_' )	{		#ifdef DEBUG_PARSER			TIXML_LOG( "XML parsing Element\n" );		#endif		returnNode = new TiXmlElement( "" );	}	else	{		#ifdef DEBUG_PARSER			TIXML_LOG( "XML parsing Unknown(2)\n" );		#endif		returnNode = new TiXmlUnknown();	}	if ( returnNode )	{		// Set the parent, so it can report errors		returnNode->parent = this;	}	else	{		if ( doc )			doc->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, TIXML_ENCODING_UNKNOWN );	}	return returnNode;}#ifdef TIXML_USE_STLvoid TiXmlElement::StreamIn (std::istream * in, TIXML_STRING * tag){	// We're called with some amount of pre-parsing. That is, some of "this"	// element is in "tag". Go ahead and stream to the closing ">"	while( in->good() )	{		int c = in->get();		if ( c <= 0 )		{			TiXmlDocument* document = GetDocument();			if ( document )				document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );			return;		}		(*tag) += (char) c ;				if ( c == '>' )			break;	}	if ( tag->length() < 3 ) return;	// Okay...if we are a "/>" tag, then we're done. We've read a complete tag.	// If not, identify and stream.	if (    tag->at( tag->length() - 1 ) == '>' 		 && tag->at( tag->length() - 2 ) == '/' )	{		// All good!		return;	}	else if ( tag->at( tag->length() - 1 ) == '>' )	{		// There is more. Could be:		//		text		//		cdata text (which looks like another node)		//		closing tag		//		another node.		for ( ;; )		{			StreamWhiteSpace( in, tag );			// Do we have text?			if ( in->good() && in->peek() != '<' ) 			{				// Yep, text.				TiXmlText text( "" );				text.StreamIn( in, tag );				// What follows text is a closing tag or another node.				// Go around again and figure it out.				continue;			}			// We now have either a closing tag...or another node.			// We should be at a "<", regardless.			if ( !in->good() ) return;			assert( in->peek() == '<' );			int tagIndex = (int) tag->length();			bool closingTag = false;			bool firstCharFound = false;			for( ;; )			{				if ( !in->good() )					return;				int c = in->peek();				if ( c <= 0 )				{					TiXmlDocument* document = GetDocument();					if ( document )						document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );					return;				}								if ( c == '>' )					break;				*tag += (char) c;				in->get();				// Early out if we find the CDATA id.				if ( c == '[' && tag->size() >= 9 )				{					size_t len = tag->size();					const char* start = tag->c_str() + len - 9;					if ( strcmp( start, "<![CDATA[" ) == 0 ) {						assert( !closingTag );						break;					}				}				if ( !firstCharFound && c != '<' && !IsWhiteSpace( c ) )				{					firstCharFound = true;					if ( c == '/' )						closingTag = true;				}			}			// If it was a closing tag, then read in the closing '>' to clean up the input stream.			// If it was not, the streaming will be done by the tag.			if ( closingTag )			{				if ( !in->good() )					return;				int c = in->get();				if ( c <= 0 )				{					TiXmlDocument* document = GetDocument();					if ( document )						document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );					return;				}				assert( c == '>' );				*tag += (char) c;				// We are done, once we've found our closing tag.				return;			}			else			{				// If not a closing tag, id it, and stream.				const char* tagloc = tag->c_str() + tagIndex;				TiXmlNode* node = Identify( tagloc, TIXML_DEFAULT_ENCODING );				if ( !node )					return;				node->StreamIn( in, tag );				delete node;				node = 0;				// No return: go around from the beginning: text, closing tag, or node.			}		}	}}#endifconst char* TiXmlElement::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ){	p = SkipWhiteSpace( p, encoding );	TiXmlDocument* document = GetDocument();	if ( !p || !*p )	{		if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, 0, 0, encoding );		return 0;	}	if ( data )	{		data->Stamp( p, encoding );		location = data->Cursor();	}	if ( *p != '<' )	{		if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, p, data, encoding );		return 0;	}	p = SkipWhiteSpace( p+1, encoding );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩精品一区二区在线播放 | 欧美一二区视频| 国产午夜精品一区二区 | 在线观看欧美黄色| 伊人色综合久久天天人手人婷| 国产成人精品网址| 亚洲精品在线免费观看视频| 国内成人精品2018免费看| 欧美一区二区三区四区五区 | 欧美日韩激情在线| 亚洲影院免费观看| 国产黄色精品视频| 欧美国产成人精品| 成人免费黄色在线| 亚洲私人影院在线观看| 91色乱码一区二区三区| 国产精品每日更新| 精品视频一区 二区 三区| 亚洲国产精品尤物yw在线观看| 777久久久精品| 激情另类小说区图片区视频区| 欧美一级免费大片| 国产福利91精品| 综合自拍亚洲综合图不卡区| 成人中文字幕在线| 亚洲最大成人网4388xx| 欧美日韩一区小说| 国产馆精品极品| 国产精品美女久久久久aⅴ| 日韩专区一卡二卡| 国产日韩欧美综合一区| 9i看片成人免费高清| 欧美aaaaaa午夜精品| 久久九九国产精品| 91麻豆蜜桃一区二区三区| 麻豆国产欧美日韩综合精品二区| 久久久久久一级片| 欧美三级韩国三级日本一级| 美女免费视频一区| 亚洲国产精品黑人久久久| 欧美日韩高清一区二区不卡| 国产精品综合av一区二区国产馆| 一区二区三区美女视频| 日韩免费视频一区二区| www.av亚洲| 欧美日韩一级片在线观看| 国产精品一区二区男女羞羞无遮挡| 亚洲高清在线视频| 久久亚洲影视婷婷| 在线观看视频一区二区欧美日韩| 国产精品影视在线| 五月综合激情婷婷六月色窝| 亚洲天堂免费看| 日韩欧美一区二区免费| 成人免费毛片嘿嘿连载视频| 激情av综合网| 亚洲综合清纯丝袜自拍| 最新国产成人在线观看| 日韩欧美一二三| 日本高清不卡一区| 99久久婷婷国产综合精品电影 | www.av精品| 日韩vs国产vs欧美| 亚洲少妇30p| 精品免费一区二区三区| 884aa四虎影成人精品一区| 成人h精品动漫一区二区三区| 亚洲乱码国产乱码精品精小说 | 久久精品亚洲精品国产欧美| 在线91免费看| 欧美在线免费观看亚洲| 日本韩国精品在线| 99精品视频在线免费观看| 精品一区二区免费在线观看| 久久精品国产**网站演员| 亚洲狠狠爱一区二区三区| 亚洲精品国产品国语在线app| 国产欧美精品国产国产专区| 欧美一二三区在线观看| 日韩欧美精品三级| 欧美性色欧美a在线播放| 国模冰冰炮一区二区| 九色|91porny| 青青青伊人色综合久久| 免费在线观看成人| 亚洲成人免费影院| 亚洲精品日韩一| 亚洲天堂成人网| 中文字幕一区二区三区在线播放| 亚洲欧洲性图库| 国产精品色眯眯| 国产精品不卡一区二区三区| 国产农村妇女精品| 欧美国产综合色视频| 国产精品福利一区二区三区| 国产亚洲精品久| 国产精品盗摄一区二区三区| 国产欧美日韩视频在线观看| 久久网站热最新地址| 国产三级一区二区| 久久精品一区二区三区四区| 国产拍欧美日韩视频二区| 国产亚洲成年网址在线观看| 久久青草欧美一区二区三区| 欧美激情艳妇裸体舞| 中文字幕视频一区| 亚洲成人午夜影院| 久久99精品久久久久久| 国产一区在线精品| 日本高清视频一区二区| 91成人看片片| 日日夜夜精品视频天天综合网| 亚洲午夜国产一区99re久久| 精品一区二区三区蜜桃| 欧美日本高清视频在线观看| 日韩欧美精品在线| 国产欧美日产一区| 精品第一国产综合精品aⅴ| 国产精品久久久久久久久果冻传媒 | 亚洲影视在线播放| 国产欧美视频一区二区三区| 精品理论电影在线观看| 26uuu精品一区二区三区四区在线| 欧美精选午夜久久久乱码6080| 色婷婷久久综合| 国产精品1区2区| 91丨porny丨国产入口| 欧洲人成人精品| 日韩一区在线看| 久久综合视频网| 综合久久综合久久| 一区二区三区国产| 蜜桃一区二区三区在线观看| 不卡一区二区中文字幕| 欧美日韩一级大片网址| 国产精品美女久久久久aⅴ国产馆| 一区二区三区不卡视频在线观看| 亚洲自拍偷拍av| 高清shemale亚洲人妖| 欧美欧美欧美欧美| 一区二区三区影院| 久久99精品久久久久婷婷| 国产成人久久精品77777最新版本| 欧美日韩一区二区三区高清 | 亚洲精品国产品国语在线app| 午夜视频在线观看一区二区三区| av影院午夜一区| 日韩一区二区在线播放| 亚洲一区在线观看免费| 福利电影一区二区| 欧美久久久一区| 亚洲综合色视频| 成人免费观看av| 亚洲国产视频直播| 国产91高潮流白浆在线麻豆 | 5月丁香婷婷综合| 欧美亚洲动漫精品| 亚洲在线一区二区三区| 亚洲成人精品一区二区| 91丨porny丨蝌蚪视频| 中文一区二区在线观看| 美脚の诱脚舐め脚责91| 91精品啪在线观看国产60岁| 一区二区三区小说| 久久久亚洲高清| 国产一区三区三区| 欧美一卡二卡三卡| 亚洲制服丝袜一区| 国产一区视频导航| 欧美日韩激情在线| 久久99国产精品麻豆| 久久午夜老司机| 日韩高清一级片| 欧美日韩卡一卡二| 亚洲高清视频在线| 91久久精品一区二区| 欧美高清在线精品一区| 免费成人小视频| 国产精品视频一区二区三区不卡| 久久成人久久爱| 国产精品国产三级国产普通话99| av高清久久久| 亚洲成人动漫在线观看| 日韩欧美一区在线观看| 国产裸体歌舞团一区二区| 69堂国产成人免费视频| 美国一区二区三区在线播放| 日韩一区二区三区视频在线 | 91蜜桃婷婷狠狠久久综合9色| 国产欧美日韩在线| 国产乱码精品一区二区三区av | 欧美亚洲国产一卡| 午夜欧美大尺度福利影院在线看| 欧美视频在线观看一区| 欧美激情资源网| 91蜜桃视频在线| 亚洲一区在线电影| 精品国产乱码久久久久久浪潮| 国产真实乱偷精品视频免| 国产亚洲一二三区|