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

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

?? tinyxmlparser.cpp

?? 一個游戲源碼,初學者可以用來學習
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
	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 );	// Read the name.	const char* pErr = p;    p = ReadName( p, &value, encoding );	if ( !p || !*p )	{		if ( document )	document->SetError( TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, pErr, data, encoding );		return 0;	}    TIXML_STRING endTag ("</");	endTag += value;	endTag += ">";	// Check for and read attributes. Also look for an empty	// tag or an end tag.	while ( p && *p )	{		pErr = p;		p = SkipWhiteSpace( p, encoding );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丝袜美腿成人在线| 韩国理伦片一区二区三区在线播放| 在线播放91灌醉迷j高跟美女| 国内精品伊人久久久久av影院| 亚洲男人的天堂一区二区| 欧美一区二区不卡视频| 91性感美女视频| 国产精品99久久久久久宅男| 日韩av电影免费观看高清完整版 | 久久久噜噜噜久久中文字幕色伊伊| 色88888久久久久久影院按摩| 久久91精品国产91久久小草| 一区二区日韩电影| 中文字幕在线观看不卡视频| 精品国产一区二区精华| 欧美精品视频www在线观看| 不卡av免费在线观看| 国产呦萝稀缺另类资源| 蜜臀av一区二区| 日韩一区欧美二区| 午夜电影一区二区三区| 一区二区三区91| 一区二区三区资源| 亚洲色图丝袜美腿| 中文字幕一区av| 国产欧美一区视频| 久久久www成人免费毛片麻豆| 日韩一区二区三区在线视频| 欧美日本在线一区| 欧美日韩在线免费视频| 91国偷自产一区二区三区成为亚洲经典 | 人人爽香蕉精品| 日韩av午夜在线观看| 午夜精品123| 日韩va亚洲va欧美va久久| 亚洲国产另类精品专区| 亚洲图片欧美一区| 午夜伦欧美伦电影理论片| 亚洲午夜羞羞片| 午夜精品视频一区| 三级精品在线观看| 麻豆精品在线看| 久久国产成人午夜av影院| 精品伊人久久久久7777人| 韩国中文字幕2020精品| 国产精品自拍三区| 成人综合婷婷国产精品久久免费| 成人性生交大片免费| 成人av在线观| 欧美最猛性xxxxx直播| 欧美性感一区二区三区| 91精品国产高清一区二区三区蜜臀 | 国产日韩欧美一区二区三区乱码| 中文字幕免费在线观看视频一区| 国产精品狼人久久影院观看方式| 国产精品视频一区二区三区不卡| 亚洲视频网在线直播| 亚洲一区av在线| 六月婷婷色综合| 成人性生交大片免费看中文网站| 91麻豆swag| 91精品啪在线观看国产60岁| 2024国产精品| 亚洲欧美视频在线观看| 午夜欧美在线一二页| 韩国成人精品a∨在线观看| heyzo一本久久综合| 欧美体内she精高潮| 精品国产一区二区三区av性色| 中文字幕欧美国产| 亚洲国产精品一区二区www在线| 青草国产精品久久久久久| 国产精品911| 欧美体内she精高潮| 2020国产精品| 亚洲一区中文在线| 国产乱码精品一区二区三区av| 99视频在线精品| 欧美一区二区三区精品| 国产精品欧美久久久久一区二区| 亚洲成人午夜电影| 福利一区福利二区| 欧美精品九九99久久| 欧美激情在线看| 亚洲v中文字幕| 成人免费看视频| 日韩欧美另类在线| 亚洲精品视频自拍| 国产精品99久| 日韩三级中文字幕| 亚洲免费高清视频在线| 国内精品视频一区二区三区八戒 | 久久新电视剧免费观看| 亚洲制服丝袜av| 成人动漫一区二区| 日韩欧美国产不卡| 亚洲国产日韩精品| 成a人片国产精品| 日韩视频123| 亚洲a一区二区| 色哟哟国产精品| 亚洲国产高清不卡| 精品午夜久久福利影院| 色88888久久久久久影院按摩| 国产亚洲成aⅴ人片在线观看| 亚洲成人动漫av| 在线中文字幕一区| 国产精品盗摄一区二区三区| 国产一区二区看久久| 欧美一区二区三区四区视频| 伊人夜夜躁av伊人久久| 99久久精品国产导航| 国产亚洲精久久久久久| 国模少妇一区二区三区| 日韩午夜激情av| 日本不卡视频在线| 欧美日韩国产高清一区二区三区| 亚洲欧美日韩国产成人精品影院| 国产成人在线视频网站| 久久久噜噜噜久久中文字幕色伊伊| 日本成人在线一区| 91精品蜜臀在线一区尤物| 亚洲午夜一区二区| 精品视频在线视频| 亚洲一区二区五区| 欧美三级视频在线观看| 亚洲永久免费av| 欧美亚洲国产bt| 亚洲综合久久久| 欧美日韩一区二区电影| 亚洲高清免费视频| 欧美日韩免费视频| 日产精品久久久久久久性色| 欧美丰满少妇xxxxx高潮对白| 亚洲成人免费观看| 在线播放/欧美激情| 免费观看91视频大全| 精品人在线二区三区| 国产在线麻豆精品观看| 久久精品亚洲一区二区三区浴池| 国产老妇另类xxxxx| 中文字幕国产一区| 91网站视频在线观看| 一级中文字幕一区二区| 9191精品国产综合久久久久久 | 天堂精品中文字幕在线| 欧美一级电影网站| 国产制服丝袜一区| 中文字幕不卡在线观看| 色综合久久88色综合天天6| 一区二区三区在线视频免费| 欧美日韩亚州综合| 男男视频亚洲欧美| 国产欧美一区二区三区在线看蜜臀 | 欧美揉bbbbb揉bbbbb| 亚洲国产另类av| 日韩精品综合一本久道在线视频| 国产在线观看免费一区| 国产精品久久久久一区二区三区| 色综合久久久久久久| 日韩影院免费视频| 国产视频一区在线观看| 一本久道中文字幕精品亚洲嫩 | av电影天堂一区二区在线 | 蜜桃av一区二区| 国产精品久久久久影院| 欧美日韩国产一级| 国产精品一区在线观看你懂的| 亚洲欧洲精品天堂一级| 欧美日韩中文字幕一区| 精品一区二区在线视频| 亚洲人成伊人成综合网小说| 欧美一区二区三区在线看| 成人性生交大片免费看在线播放| 亚洲国产日韩精品| 国产日韩精品一区| 欧美日韩国产小视频在线观看| 国产在线精品一区二区夜色| 亚洲免费av观看| 久久综合九色综合欧美98| 91福利在线看| 国产精品性做久久久久久| 亚洲午夜精品一区二区三区他趣| 久久老女人爱爱| 欧美色成人综合| 成熟亚洲日本毛茸茸凸凹| 免费观看91视频大全| 自拍偷拍国产精品| 久久久久久久久伊人| 欧美日韩一卡二卡三卡| www.欧美日韩| 韩国女主播一区| 日本三级亚洲精品| 亚洲女同一区二区| 国产午夜一区二区三区| 欧美伦理视频网站| 91精彩视频在线观看| 成人一区在线观看| 国产在线国偷精品产拍免费yy | 日本人妖一区二区|