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

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

?? tinyxml.cpp

?? 一個小巧、好用的xml文檔 解析器
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
	return s;}#endifint TiXmlElement::QueryIntAttribute( const char* name, int* ival ) const{	const TiXmlAttribute* node = attributeSet.Find( name );	if ( !node )		return TIXML_NO_ATTRIBUTE;	return node->QueryIntValue( ival );}#ifdef TIXML_USE_STLint TiXmlElement::QueryIntAttribute( const std::string& name, int* ival ) const{	const TiXmlAttribute* node = attributeSet.Find( name );	if ( !node )		return TIXML_NO_ATTRIBUTE;	return node->QueryIntValue( ival );}#endifint TiXmlElement::QueryDoubleAttribute( const char* name, double* dval ) const{	const TiXmlAttribute* node = attributeSet.Find( name );	if ( !node )		return TIXML_NO_ATTRIBUTE;	return node->QueryDoubleValue( dval );}#ifdef TIXML_USE_STLint TiXmlElement::QueryDoubleAttribute( const std::string& name, double* dval ) const{	const TiXmlAttribute* node = attributeSet.Find( name );	if ( !node )		return TIXML_NO_ATTRIBUTE;	return node->QueryDoubleValue( dval );}#endifvoid TiXmlElement::SetAttribute( const char * name, int val ){		char buf[64];	#if defined(TIXML_SNPRINTF)				TIXML_SNPRINTF( buf, sizeof(buf), "%d", val );	#else		sprintf( buf, "%d", val );	#endif	SetAttribute( name, buf );}#ifdef TIXML_USE_STLvoid TiXmlElement::SetAttribute( const std::string& name, int val ){	   std::ostringstream oss;   oss << val;   SetAttribute( name, oss.str() );}#endifvoid TiXmlElement::SetDoubleAttribute( const char * name, double val ){		char buf[256];	#if defined(TIXML_SNPRINTF)				TIXML_SNPRINTF( buf, sizeof(buf), "%f", val );	#else		sprintf( buf, "%f", val );	#endif	SetAttribute( name, buf );}void TiXmlElement::SetAttribute( const char * cname, const char * cvalue ){    #ifdef TIXML_USE_STL	TIXML_STRING _name( cname );	TIXML_STRING _value( cvalue );	#else	const char* _name = cname;	const char* _value = cvalue;	#endif	TiXmlAttribute* node = attributeSet.Find( _name );	if ( node )	{		node->SetValue( _value );		return;	}	TiXmlAttribute* attrib = new TiXmlAttribute( cname, cvalue );	if ( attrib )	{		attributeSet.Add( attrib );	}	else	{		TiXmlDocument* document = GetDocument();		if ( document ) document->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, TIXML_ENCODING_UNKNOWN );	}}#ifdef TIXML_USE_STLvoid TiXmlElement::SetAttribute( const std::string& name, const std::string& _value ){	TiXmlAttribute* node = attributeSet.Find( name );	if ( node )	{		node->SetValue( _value );		return;	}	TiXmlAttribute* attrib = new TiXmlAttribute( name, _value );	if ( attrib )	{		attributeSet.Add( attrib );	}	else	{		TiXmlDocument* document = GetDocument();		if ( document ) document->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, TIXML_ENCODING_UNKNOWN );	}}#endifvoid TiXmlElement::Print( FILE* cfile, int depth ) const{	int i;	assert( cfile );	for ( i=0; i<depth; i++ ) {		fprintf( cfile, "    " );	}	fprintf( cfile, "<%s", value.c_str() );	const TiXmlAttribute* attrib;	for ( attrib = attributeSet.First(); attrib; attrib = attrib->Next() )	{		fprintf( cfile, " " );		attrib->Print( cfile, depth );	}	// There are 3 different formatting approaches:	// 1) An element without children is printed as a <foo /> node	// 2) An element with only a text child is printed as <foo> text </foo>	// 3) An element with children is printed on multiple lines.	TiXmlNode* node;	if ( !firstChild )	{		fprintf( cfile, " />" );	}	else if ( firstChild == lastChild && firstChild->ToText() )	{		fprintf( cfile, ">" );		firstChild->Print( cfile, depth + 1 );		fprintf( cfile, "</%s>", value.c_str() );	}	else	{		fprintf( cfile, ">" );		for ( node = firstChild; node; node=node->NextSibling() )		{			if ( !node->ToText() )			{				fprintf( cfile, "\n" );			}			node->Print( cfile, depth+1 );		}		fprintf( cfile, "\n" );		for( i=0; i<depth; ++i ) {			fprintf( cfile, "    " );		}		fprintf( cfile, "</%s>", value.c_str() );	}}void TiXmlElement::CopyTo( TiXmlElement* target ) const{	// superclass:	TiXmlNode::CopyTo( target );	// Element class: 	// Clone the attributes, then clone the children.	const TiXmlAttribute* attribute = 0;	for(	attribute = attributeSet.First();	attribute;	attribute = attribute->Next() )	{		target->SetAttribute( attribute->Name(), attribute->Value() );	}	TiXmlNode* node = 0;	for ( node = firstChild; node; node = node->NextSibling() )	{		target->LinkEndChild( node->Clone() );	}}bool TiXmlElement::Accept( TiXmlVisitor* visitor ) const{	if ( visitor->VisitEnter( *this, attributeSet.First() ) ) 	{		for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )		{			if ( !node->Accept( visitor ) )				break;		}	}	return visitor->VisitExit( *this );}TiXmlNode* TiXmlElement::Clone() const{	TiXmlElement* clone = new TiXmlElement( Value() );	if ( !clone )		return 0;	CopyTo( clone );	return clone;}const char* TiXmlElement::GetText() const{	const TiXmlNode* child = this->FirstChild();	if ( child ) {		const TiXmlText* childText = child->ToText();		if ( childText ) {			return childText->Value();		}	}	return 0;}TiXmlDocument::TiXmlDocument() : TiXmlNode( TiXmlNode::DOCUMENT ){	tabsize = 4;	useMicrosoftBOM = false;	ClearError();}TiXmlDocument::TiXmlDocument( const char * documentName ) : TiXmlNode( TiXmlNode::DOCUMENT ){	tabsize = 4;	useMicrosoftBOM = false;	value = documentName;	ClearError();}#ifdef TIXML_USE_STLTiXmlDocument::TiXmlDocument( const std::string& documentName ) : TiXmlNode( TiXmlNode::DOCUMENT ){	tabsize = 4;	useMicrosoftBOM = false;    value = documentName;	ClearError();}#endifTiXmlDocument::TiXmlDocument( const TiXmlDocument& copy ) : TiXmlNode( TiXmlNode::DOCUMENT ){	copy.CopyTo( this );}void TiXmlDocument::operator=( const TiXmlDocument& copy ){	Clear();	copy.CopyTo( this );}bool TiXmlDocument::LoadFile( TiXmlEncoding encoding ){	// See STL_STRING_BUG below.	//StringToBuffer buf( value );	return LoadFile( Value(), encoding );}bool TiXmlDocument::SaveFile() const{	// See STL_STRING_BUG below.//	StringToBuffer buf( value );////	if ( buf.buffer && SaveFile( buf.buffer ) )//		return true;////	return false;	return SaveFile( Value() );}bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding ){	// There was a really terrifying little bug here. The code:	//		value = filename	// in the STL case, cause the assignment method of the std::string to	// be called. What is strange, is that the std::string had the same	// address as it's c_str() method, and so bad things happen. Looks	// like a bug in the Microsoft STL implementation.	// Add an extra string to avoid the crash.	TIXML_STRING filename( _filename );	value = filename;	// reading in binary mode so that tinyxml can normalize the EOL	FILE* file = fopen( value.c_str (), "rb" );		if ( file )	{		bool result = LoadFile( file, encoding );		fclose( file );		return result;	}	else	{		SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );		return false;	}}bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding ){	if ( !file ) 	{		SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );		return false;	}	// Delete the existing data:	Clear();	location.Clear();	// Get the file size, so we can pre-allocate the string. HUGE speed impact.	long length = 0;	fseek( file, 0, SEEK_END );	length = ftell( file );	fseek( file, 0, SEEK_SET );	// Strange case, but good to handle up front.	if ( length == 0 )	{		SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );		return false;	}	// If we have a file, assume it is all one big XML file, and read it in.	// The document parser may decide the document ends sooner than the entire file, however.	TIXML_STRING data;	data.reserve( length );	// Subtle bug here. TinyXml did use fgets. But from the XML spec:	// 2.11 End-of-Line Handling	// <snip>	// <quote>	// ...the XML processor MUST behave as if it normalized all line breaks in external 	// parsed entities (including the document entity) on input, before parsing, by translating 	// both the two-character sequence #xD #xA and any #xD that is not followed by #xA to 	// a single #xA character.	// </quote>	//	// It is not clear fgets does that, and certainly isn't clear it works cross platform. 	// Generally, you expect fgets to translate from the convention of the OS to the c/unix	// convention, and not work generally.	/*	while( fgets( buf, sizeof(buf), file ) )	{		data += buf;	}	*/	char* buf = new char[ length+1 ];	buf[0] = 0;	if ( fread( buf, length, 1, file ) != 1 ) {		delete [] buf;		SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );		return false;	}	const char* lastPos = buf;	const char* p = buf;	buf[length] = 0;	while( *p ) {		assert( p < (buf+length) );		if ( *p == 0xa ) {			// Newline character. No special rules for this. Append all the characters			// since the last string, and include the newline.			data.append( lastPos, (p-lastPos+1) );	// append, include the newline			++p;									// move past the newline			lastPos = p;							// and point to the new buffer (may be 0)			assert( p <= (buf+length) );		}		else if ( *p == 0xd ) {			// Carriage return. Append what we have so far, then			// handle moving forward in the buffer.			if ( (p-lastPos) > 0 ) {				data.append( lastPos, p-lastPos );	// do not add the CR			}			data += (char)0xa;						// a proper newline			if ( *(p+1) == 0xa ) {				// Carriage return - new line sequence				p += 2;				lastPos = p;				assert( p <= (buf+length) );			}			else {				// it was followed by something else...that is presumably characters again.				++p;				lastPos = p;				assert( p <= (buf+length) );			}		}		else {			++p;		}	}	// Handle any left over characters.	if ( p-lastPos ) {		data.append( lastPos, p-lastPos );	}			delete [] buf;	buf = 0;	Parse( data.c_str(), 0, encoding );	if (  Error() )        return false;    else		return true;}bool TiXmlDocument::SaveFile( const char * filename ) const{	// The old c stuff lives on...	FILE* fp = fopen( filename, "w" );	if ( fp )	{		bool result = SaveFile( fp );		fclose( fp );		return result;	}	return false;}bool TiXmlDocument::SaveFile( FILE* fp ) const{	if ( useMicrosoftBOM ) 	{		const unsigned char TIXML_UTF_LEAD_0 = 0xefU;		const unsigned char TIXML_UTF_LEAD_1 = 0xbbU;		const unsigned char TIXML_UTF_LEAD_2 = 0xbfU;		fputc( TIXML_UTF_LEAD_0, fp );		fputc( TIXML_UTF_LEAD_1, fp );		fputc( TIXML_UTF_LEAD_2, fp );	}	Print( fp, 0 );	return (ferror(fp) == 0);}void TiXmlDocument::CopyTo( TiXmlDocument* target ) const{	TiXmlNode::CopyTo( target );	target->error = error;	target->errorDesc = errorDesc.c_str ();	TiXmlNode* node = 0;	for ( node = firstChild; node; node = node->NextSibling() )	{		target->LinkEndChild( node->Clone() );	}	}TiXmlNode* TiXmlDocument::Clone() const{	TiXmlDocument* clone = new TiXmlDocument();	if ( !clone )		return 0;	CopyTo( clone );	return clone;}void TiXmlDocument::Print( FILE* cfile, int depth ) const{	assert( cfile );	for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )	{		node->Print( cfile, depth );		fprintf( cfile, "\n" );	}}bool TiXmlDocument::Accept( TiXmlVisitor* visitor ) const{	if ( visitor->VisitEnter( *this ) )	{		for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )		{			if ( !node->Accept( visitor ) )				break;		}	}	return visitor->VisitExit( *this );}const TiXmlAttribute* TiXmlAttribute::Next() const{	// We are using knowledge of the sentinel. The sentinel	// have a value or name.	if ( next->value.empty() && next->name.empty() )		return 0;	return next;}/*TiXmlAttribute* TiXmlAttribute::Next(){	// We are using knowledge of the sentinel. The sentinel	// have a value or name.	if ( next->value.empty() && next->name.empty() )		return 0;	return next;}*/const TiXmlAttribute* TiXmlAttribute::Previous() const{	// We are using knowledge of the sentinel. The sentinel	// have a value or name.	if ( prev->value.empty() && prev->name.empty() )		return 0;	return prev;}/*TiXmlAttribute* TiXmlAttribute::Previous(){	// We are using knowledge of the sentinel. The sentinel	// have a value or name.	if ( prev->value.empty() && prev->name.empty() )		return 0;	return prev;}*/void TiXmlAttribute::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const{	TIXML_STRING n, v;	PutString( name, &n );	PutString( value, &v );	if (value.find ('\"') == TIXML_STRING::npos) {		if ( cfile ) {		fprintf (cfile, "%s=\"%s\"", n.c_str(), v.c_str() );		}		if ( str ) {			(*str) += n; (*str) += "=\""; (*str) += v; (*str) += "\"";		}	}	else {		if ( cfile ) {		fprintf (cfile, "%s='%s'", n.c_str(), v.c_str() );		}		if ( str ) {			(*str) += n; (*str) += "='"; (*str) += v; (*str) += "'";		}	}}int TiXmlAttribute::QueryIntValue( int* ival ) const{	if ( sscanf( value.c_str(), "%d", ival ) == 1 )		return TIXML_SUCCESS;	return TIXML_WRONG_TYPE;}int TiXmlAttribute::QueryDoubleValue( double* dval ) const{	if ( sscanf( value.c_str(), "%lf", dval ) == 1 )		return TIXML_SUCCESS;	return TIXML_WRONG_TYPE;}void TiXmlAttribute::SetIntValue( int _value ){	char buf [64];	#if defined(TIXML_SNPRINTF)				TIXML_SNPRINTF(buf, sizeof(buf), "%d", _value);	#else		sprintf (buf, "%d", _value);	#endif	SetValue (buf);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
粉嫩av一区二区三区在线播放| 久久久99精品久久| 久久综合久久综合久久| 亚洲欧洲中文日韩久久av乱码| 另类综合日韩欧美亚洲| 色偷偷久久人人79超碰人人澡| 精品少妇一区二区三区视频免付费| 亚洲美女屁股眼交| 成人av电影在线播放| 精品成人在线观看| 日韩 欧美一区二区三区| 91在线观看下载| 国产亚洲一区字幕| 久久超碰97中文字幕| 538在线一区二区精品国产| 亚洲丝袜另类动漫二区| 成人app在线| 欧美国产日产图区| 国产成人鲁色资源国产91色综| 日韩一级精品视频在线观看| 亚洲第一激情av| 在线国产电影不卡| 亚洲男人的天堂网| 91黄视频在线| 亚洲乱码中文字幕| 欧美三级在线看| 亚洲国产一区二区a毛片| 色悠悠久久综合| 亚洲欧美国产三级| 91黄色免费观看| 一区二区三区精品久久久| 91蜜桃视频在线| 亚洲午夜在线观看视频在线| 欧美性感一区二区三区| 亚洲国产aⅴ成人精品无吗| 欧美综合视频在线观看| 亚洲高清视频的网址| 在线成人午夜影院| 久久电影网电视剧免费观看| 精品日韩欧美一区二区| 精品亚洲免费视频| 中文文精品字幕一区二区| 99精品久久久久久| 亚洲风情在线资源站| 日韩三级在线观看| 高清日韩电视剧大全免费| 18欧美乱大交hd1984| 欧美精品在线观看播放| 奇米777欧美一区二区| 精品盗摄一区二区三区| 国产成人亚洲综合a∨婷婷| 国产精品短视频| 欧美天天综合网| 国产在线播放一区三区四| 国产视频不卡一区| 在线亚洲欧美专区二区| 日韩**一区毛片| 国产精品视频线看| 欧美久久久久久久久久| 久久爱www久久做| 国产精品美女久久久久久| 欧美日韩情趣电影| 国产精品一区二区久久不卡| 亚洲精选一二三| 欧美一级搡bbbb搡bbbb| 高清在线观看日韩| 日韩国产欧美在线观看| 久久久久久久久伊人| 欧美吞精做爰啪啪高潮| 国产中文字幕精品| 亚洲一二三级电影| 国产日韩欧美亚洲| 欧美日韩一区二区不卡| 国产 欧美在线| 青青国产91久久久久久| 1024精品合集| 2024国产精品视频| 欧美性色黄大片手机版| 懂色中文一区二区在线播放| 午夜免费久久看| 国产精品久线观看视频| 日韩精品一区二区三区四区视频| 91免费国产在线| 国产麻豆成人传媒免费观看| 天天综合色天天| 亚洲少妇30p| 国产网红主播福利一区二区| 91精品欧美福利在线观看| av高清久久久| 国产成人精品一区二| 麻豆免费看一区二区三区| 亚洲无线码一区二区三区| 最新久久zyz资源站| 精品国产一区二区三区不卡| 欧美日韩免费观看一区三区| 色综合色综合色综合色综合色综合 | 99v久久综合狠狠综合久久| 经典三级视频一区| 免费av网站大全久久| 婷婷综合久久一区二区三区| 一区二区久久久久久| 中文字幕一区二区不卡 | 91麻豆精品国产无毒不卡在线观看| 不卡av在线免费观看| 韩国成人在线视频| 久久av老司机精品网站导航| 日本三级亚洲精品| 天堂va蜜桃一区二区三区漫画版| 一区二区成人在线观看| 亚洲一区二区三区不卡国产欧美| 亚洲三级免费电影| 亚洲人快播电影网| 亚洲人成人一区二区在线观看 | 亚洲国产色一区| 亚洲中国最大av网站| 亚洲3atv精品一区二区三区| 性做久久久久久| 午夜精品视频一区| 免费高清在线视频一区·| 在线不卡免费欧美| 日韩成人一级片| 午夜久久久影院| 日本欧美一区二区三区乱码| 免费人成精品欧美精品| 国产在线精品一区二区不卡了| 久久精品国产77777蜜臀| 国产一区在线看| 成人激情午夜影院| 91黄色激情网站| 欧美人与z0zoxxxx视频| 欧美一区二区三区喷汁尤物| 日韩免费电影网站| 中文字幕av一区 二区| 亚洲免费观看高清| 日韩精品电影在线观看| 久久不见久久见中文字幕免费| 国产经典欧美精品| 91免费国产在线| 欧美一区二区在线视频| 精品国产欧美一区二区| 欧美国产欧美综合| 亚洲成av人**亚洲成av**| 蜜臀精品一区二区三区在线观看 | 99re热这里只有精品视频| 国产欧美一区视频| 亚洲已满18点击进入久久| 日韩高清中文字幕一区| 国产91富婆露脸刺激对白| 欧美在线免费播放| 日韩精品一区二| 亚洲图片另类小说| 美女国产一区二区三区| www.久久久久久久久| 欧美精选一区二区| 国产精品伦一区二区三级视频| 亚洲一区二区三区激情| 国产激情一区二区三区| 欧美高清dvd| 国产精品国产自产拍高清av王其 | 一区二区中文字幕在线| 日本vs亚洲vs韩国一区三区二区 | 国产91丝袜在线播放0| 欧美人狂配大交3d怪物一区| 国产欧美精品区一区二区三区| 亚洲最新视频在线播放| 国产传媒一区在线| 欧美一区午夜精品| 亚洲国产日日夜夜| av一区二区三区四区| 欧美变态口味重另类| 亚洲成人动漫精品| 色噜噜狠狠色综合欧洲selulu| 久久亚洲捆绑美女| 日韩av成人高清| 欧美三级日韩三级国产三级| 亚洲人成亚洲人成在线观看图片| 韩国午夜理伦三级不卡影院| 6080国产精品一区二区| 亚洲三级电影网站| 高清视频一区二区| 久久综合色之久久综合| 日韩成人免费电影| 欧美日韩你懂的| 亚洲一区二区影院| 色哟哟一区二区三区| 国产精品不卡在线观看| 国产高清亚洲一区| 久久综合久久综合亚洲| 久久66热re国产| 日韩女优电影在线观看| 日本伊人色综合网| 欧美剧情片在线观看| 日日摸夜夜添夜夜添国产精品| 色国产综合视频| 一区二区三区在线播放| 91丨九色丨蝌蚪富婆spa| 国产精品免费网站在线观看| 大尺度一区二区| 最新热久久免费视频| 在线看日本不卡|