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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? xmltest.cpp

?? xml 簡單解析器
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
		TiXmlElement text1( "text" );
		parse1 >> text1;

		XmlTest ( "Condense white space OFF.", "This  is    \ntext",
					text1.FirstChild()->Value(),
					true );
	}
	TiXmlBase::SetCondenseWhiteSpace( true );
#endif

	//////////////////////////////////////////////////////
	// GetText();
	{
		const char* str = "<foo>This is text</foo>";
		TiXmlDocument doc;
		doc.Parse( str );
		const TiXmlElement* element = doc.RootElement();

		XmlTest( "GetText() normal use.", "This is text", element->GetText() );

		str = "<foo><b>This is text</b></foo>";
		doc.Clear();
		doc.Parse( str );
		element = doc.RootElement();

		XmlTest( "GetText() contained element.", element->GetText() == 0, true );

		str = "<foo>This is <b>text</b></foo>";
		doc.Clear();
		TiXmlBase::SetCondenseWhiteSpace( false );
		doc.Parse( str );
		TiXmlBase::SetCondenseWhiteSpace( true );
		element = doc.RootElement();

		XmlTest( "GetText() partial.", "This is ", element->GetText() );
	}


	//////////////////////////////////////////////////////
	// CDATA
	{
		const char* str =	"<xmlElement>"
								"<![CDATA["
									"I am > the rules!\n"
									"...since I make symbolic puns"
								"]]>"
							"</xmlElement>";
		TiXmlDocument doc;
		doc.Parse( str );
		doc.Print();

		XmlTest( "CDATA parse.", doc.FirstChildElement()->FirstChild()->Value(), 
								 "I am > the rules!\n...since I make symbolic puns",
								 true );

		#ifdef TIXML_USE_STL
		//cout << doc << '\n';

		doc.Clear();

		istringstream parse0( str );
		parse0 >> doc;
		//cout << doc << '\n';

		XmlTest( "CDATA stream.", doc.FirstChildElement()->FirstChild()->Value(), 
								 "I am > the rules!\n...since I make symbolic puns",
								 true );
		#endif

		TiXmlDocument doc1 = doc;
		//doc.Print();

		XmlTest( "CDATA copy.", doc1.FirstChildElement()->FirstChild()->Value(), 
								 "I am > the rules!\n...since I make symbolic puns",
								 true );
	}


	//////////////////////////////////////////////////////
	printf ("\n** Bug regression tests **\n");

	// InsertBeforeChild and InsertAfterChild causes crash.
	{
		TiXmlElement parent( "Parent" );
		TiXmlElement childText0( "childText0" );
		TiXmlElement childText1( "childText1" );
		TiXmlNode* childNode0 = parent.InsertEndChild( childText0 );
		TiXmlNode* childNode1 = parent.InsertBeforeChild( childNode0, childText1 );

		XmlTest( "Test InsertBeforeChild on empty node.", ( childNode1 == parent.FirstChild() ), true );
	}

	{
		// InsertBeforeChild and InsertAfterChild causes crash.
		TiXmlElement parent( "Parent" );
		TiXmlElement childText0( "childText0" );
		TiXmlElement childText1( "childText1" );
		TiXmlNode* childNode0 = parent.InsertEndChild( childText0 );
		TiXmlNode* childNode1 = parent.InsertAfterChild( childNode0, childText1 );

		XmlTest( "Test InsertAfterChild on empty node. ", ( childNode1 == parent.LastChild() ), true );
	}

	// Reports of missing constructors, irregular string problems.
	{
		// Missing constructor implementation. No test -- just compiles.
		TiXmlText text( "Missing" );

		#ifdef TIXML_USE_STL
			// Missing implementation:
			TiXmlDocument doc;
			string name = "missing";
			doc.LoadFile( name );

			TiXmlText textSTL( name );
		#else
			// verifying some basic string functions:
			TiXmlString a;
			TiXmlString b( "Hello" );
			TiXmlString c( "ooga" );

			c = " World!";
			a = b;
			a += c;
			a = a;

			XmlTest( "Basic TiXmlString test. ", "Hello World!", a.c_str() );
		#endif
 	}

	// Long filenames crashing STL version
	{
		TiXmlDocument doc( "midsummerNightsDreamWithAVeryLongFilenameToConfuseTheStringHandlingRoutines.xml" );
		bool loadOkay = doc.LoadFile();
		loadOkay = true;	// get rid of compiler warning.
		// Won't pass on non-dev systems. Just a "no crash" check.
		//XmlTest( "Long filename. ", true, loadOkay );
	}

	{
		// Entities not being written correctly.
		// From Lynn Allen

		const char* passages =
			"<?xml version=\"1.0\" standalone=\"no\" ?>"
			"<passages count=\"006\" formatversion=\"20020620\">"
				"<psg context=\"Line 5 has &quot;quotation marks&quot; and &apos;apostrophe marks&apos;."
				" It also has &lt;, &gt;, and &amp;, as well as a fake copyright &#xA9;.\"> </psg>"
			"</passages>";

		TiXmlDocument doc( "passages.xml" );
		doc.Parse( passages );
		TiXmlElement* psg = doc.RootElement()->FirstChildElement();
		const char* context = psg->Attribute( "context" );
		const char* expected = "Line 5 has \"quotation marks\" and 'apostrophe marks'. It also has <, >, and &, as well as a fake copyright \xC2\xA9.";

		XmlTest( "Entity transformation: read. ", expected, context, true );

		FILE* textfile = fopen( "textfile.txt", "w" );
		if ( textfile )
		{
			psg->Print( textfile, 0 );
			fclose( textfile );
		}
		textfile = fopen( "textfile.txt", "r" );
		assert( textfile );
		if ( textfile )
		{
			char buf[ 1024 ];
			fgets( buf, 1024, textfile );
			XmlTest( "Entity transformation: write. ",
					 "<psg context=\'Line 5 has &quot;quotation marks&quot; and &apos;apostrophe marks&apos;."
					 " It also has &lt;, &gt;, and &amp;, as well as a fake copyright \xC2\xA9.' />",
					 buf,
					 true );
		}
		fclose( textfile );
	}

    {
		FILE* textfile = fopen( "test5.xml", "w" );
		if ( textfile )
		{
            fputs("<?xml version='1.0'?><a.elem xmi.version='2.0'/>", textfile);
            fclose(textfile);

			TiXmlDocument doc;
            doc.LoadFile( "test5.xml" );
            XmlTest( "dot in element attributes and names", doc.Error(), 0);
		}
    }

	{
		FILE* textfile = fopen( "test6.xml", "w" );
		if ( textfile )
		{
            fputs("<element><Name>1.1 Start easy ignore fin thickness&#xA;</Name></element>", textfile );
            fclose(textfile);

            TiXmlDocument doc;
            bool result = doc.LoadFile( "test6.xml" );
            XmlTest( "Entity with one digit.", result, true );

			TiXmlText* text = doc.FirstChildElement()->FirstChildElement()->FirstChild()->ToText();
			XmlTest( "Entity with one digit.",
						text->Value(), "1.1 Start easy ignore fin thickness\n" );
		}
    }

	{
		// DOCTYPE not preserved (950171)
		// 
		const char* doctype =
			"<?xml version=\"1.0\" ?>"
			"<!DOCTYPE PLAY SYSTEM 'play.dtd'>"
			"<!ELEMENT title (#PCDATA)>"
			"<!ELEMENT books (title,authors)>"
			"<element />";

		TiXmlDocument doc;
		doc.Parse( doctype );
		doc.SaveFile( "test7.xml" );
		doc.Clear();
		doc.LoadFile( "test7.xml" );
		
		TiXmlHandle docH( &doc );
		TiXmlUnknown* unknown = docH.Child( 1 ).Unknown();
		XmlTest( "Correct value of unknown.", "!DOCTYPE PLAY SYSTEM 'play.dtd'", unknown->Value() );
		#ifdef TIXML_USE_STL
		TiXmlNode* node = docH.Child( 2 ).Node();
		std::string str;
		str << (*node);
		XmlTest( "Correct streaming of unknown.", "<!ELEMENT title (#PCDATA)>", str.c_str() );
		#endif
	}

	{
		// [ 791411 ] Formatting bug
		// Comments do not stream out correctly.
		const char* doctype = 
			"<!-- Somewhat<evil> -->";
		TiXmlDocument doc;
		doc.Parse( doctype );

		TiXmlHandle docH( &doc );
		TiXmlComment* comment = docH.Child( 0 ).Node()->ToComment();

		XmlTest( "Comment formatting.", " Somewhat<evil> ", comment->Value() );
		#ifdef TIXML_USE_STL
		std::string str;
		str << (*comment);
		XmlTest( "Comment streaming.", "<!-- Somewhat<evil> -->", str.c_str() );
		#endif
	}

	{
		// [ 870502 ] White space issues
		TiXmlDocument doc;
		TiXmlText* text;
		TiXmlHandle docH( &doc );
	
		const char* doctype0 = "<element> This has leading and trailing space </element>";
		const char* doctype1 = "<element>This has  internal space</element>";
		const char* doctype2 = "<element> This has leading, trailing, and  internal space </element>";

		TiXmlBase::SetCondenseWhiteSpace( false );
		doc.Clear();
		doc.Parse( doctype0 );
		text = docH.FirstChildElement( "element" ).Child( 0 ).Text();
		XmlTest( "White space kept.", " This has leading and trailing space ", text->Value() );

		doc.Clear();
		doc.Parse( doctype1 );
		text = docH.FirstChildElement( "element" ).Child( 0 ).Text();
		XmlTest( "White space kept.", "This has  internal space", text->Value() );

		doc.Clear();
		doc.Parse( doctype2 );
		text = docH.FirstChildElement( "element" ).Child( 0 ).Text();
		XmlTest( "White space kept.", " This has leading, trailing, and  internal space ", text->Value() );

		TiXmlBase::SetCondenseWhiteSpace( true );
		doc.Clear();
		doc.Parse( doctype0 );
		text = docH.FirstChildElement( "element" ).Child( 0 ).Text();
		XmlTest( "White space condensed.", "This has leading and trailing space", text->Value() );

		doc.Clear();
		doc.Parse( doctype1 );
		text = docH.FirstChildElement( "element" ).Child( 0 ).Text();
		XmlTest( "White space condensed.", "This has internal space", text->Value() );

		doc.Clear();
		doc.Parse( doctype2 );
		text = docH.FirstChildElement( "element" ).Child( 0 ).Text();
		XmlTest( "White space condensed.", "This has leading, trailing, and internal space", text->Value() );
	}

	{
		// Double attributes
		const char* doctype = "<element attr='red' attr='blue' />";

		TiXmlDocument doc;
		doc.Parse( doctype );
		
		XmlTest( "Parsing repeated attributes.", 0, (int)doc.Error() );	// not an  error to tinyxml
		XmlTest( "Parsing repeated attributes.", "blue", doc.FirstChildElement( "element" )->Attribute( "attr" ) );
	}

	{
		// Embedded null in stream.
		const char* doctype = "<element att\0r='red' attr='blue' />";

		TiXmlDocument doc;
		doc.Parse( doctype );
		XmlTest( "Embedded null throws error.", true, doc.Error() );

		#ifdef TIXML_USE_STL
		istringstream strm( doctype );
		doc.Clear();
		doc.ClearError();
		strm >> doc;
		XmlTest( "Embedded null throws error.", true, doc.Error() );
		#endif
	}

    /*{
            // Legacy mode test. (This test may only pass on a western system)
            const char* str =
                        "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"
                        "<

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩av二区在线播放| 欧美日韩亚洲国产综合| 亚洲免费在线电影| 国产精品一二一区| 亚洲欧美日韩人成在线播放| 精品日韩一区二区三区 | 一区二区日韩电影| 精品女同一区二区| 色狠狠综合天天综合综合| 国产综合色产在线精品| 亚洲高清在线视频| **欧美大码日韩| 成人黄色在线看| 免费在线观看一区| 一区二区三区四区乱视频| 久久久噜噜噜久噜久久综合| 欧美无砖专区一中文字| 成人性生交大片免费看在线播放 | 亚洲第一会所有码转帖| 国产精品入口麻豆九色| 欧美精品一区二区精品网| 欧美日韩美女一区二区| 午夜精品久久一牛影视| 亚洲人成网站在线| 国产精品乱码一区二区三区软件| 欧美精品一区二区三区在线播放| 欧美肥妇bbw| 欧美三级三级三级| 色婷婷国产精品| 91亚洲男人天堂| 成人午夜电影小说| 国产99久久精品| 国产宾馆实践打屁股91| 国产精品一二三区在线| 激情五月播播久久久精品| 奇米四色…亚洲| 日本不卡中文字幕| 日韩精品一区第一页| 亚洲成av人片一区二区三区| 玉米视频成人免费看| 综合分类小说区另类春色亚洲小说欧美 | 欧美精品一区二区精品网| 亚洲精品在线三区| 日韩欧美色电影| 精品日韩一区二区三区免费视频| 日韩一区二区免费在线电影| 日韩一区二区三区视频| 日韩欧美一级在线播放| 精品成人a区在线观看| 26uuu精品一区二区三区四区在线| 欧美成人女星排名| 久久久精品日韩欧美| 国产香蕉久久精品综合网| 中文字幕国产精品一区二区| 国产精品久线在线观看| 亚洲视频在线观看一区| 亚洲高清不卡在线| 日本aⅴ免费视频一区二区三区 | 国产最新精品免费| 国产成人鲁色资源国产91色综 | 日韩av中文字幕一区二区| 久久精品久久久精品美女| 国产一区二区视频在线播放| 日韩理论片网站| 一区二区三区日韩精品| 天堂av在线一区| 国产麻豆成人精品| 99这里都是精品| 欧美aaaaa成人免费观看视频| 精品一区二区在线播放| 国产成人av电影免费在线观看| 成人av在线播放网站| 欧美中文字幕一区二区三区亚洲| 欧美疯狂做受xxxx富婆| 国产亚洲欧美激情| 亚洲午夜一区二区三区| 久久黄色级2电影| av不卡免费在线观看| 欧美美女一区二区| 国产欧美一区在线| 亚洲一区免费在线观看| 激情久久五月天| 91视频在线看| 日韩三级电影网址| 1000部国产精品成人观看| 一区二区三区视频在线观看| 久久精品国产精品亚洲精品| 国产成人综合在线播放| 欧美卡1卡2卡| 国产精品福利影院| 免费在线观看一区| 91精品办公室少妇高潮对白| 26uuu成人网一区二区三区| 亚洲精品中文字幕乱码三区| 久久丁香综合五月国产三级网站| 91视频观看视频| 精品国产sm最大网站免费看| 一区二区三区中文字幕电影| 国产一区二区三区免费看| 欧美视频中文字幕| 久久精品亚洲麻豆av一区二区| 午夜精品久久久久久| 99麻豆久久久国产精品免费| 欧美zozo另类异族| 性感美女久久精品| 国产成都精品91一区二区三| 欧美卡1卡2卡| 一区二区免费视频| 国产69精品久久久久毛片| 91精品国产aⅴ一区二区| 亚洲乱码一区二区三区在线观看| 黄页视频在线91| 欧美浪妇xxxx高跟鞋交| 亚洲视频综合在线| 国产成人在线色| 欧美一区二区三区喷汁尤物| 亚洲国产精品久久不卡毛片| 99国产精品视频免费观看| 国产亚洲制服色| 国产一区二区主播在线| 91精品国产一区二区人妖| 亚洲国产精品麻豆| 91麻豆精品一区二区三区| 中国色在线观看另类| 国产精品一区二区果冻传媒| 精品日韩在线一区| 免费高清在线视频一区·| 在线不卡的av| 日本一不卡视频| 欧美日韩久久久一区| 亚洲va韩国va欧美va精品| 91黄色小视频| 一区二区三区在线不卡| 色狠狠色狠狠综合| 一区二区三区影院| 色哟哟欧美精品| 一区二区三区国产精品| 成人av影院在线| 综合久久一区二区三区| 99精品欧美一区二区三区综合在线| 国产精品亲子乱子伦xxxx裸| 成人免费精品视频| 中文字幕在线不卡一区二区三区| eeuss鲁一区二区三区| 中文字幕亚洲一区二区va在线| av动漫一区二区| 亚洲人被黑人高潮完整版| 91福利精品第一导航| 亚洲丰满少妇videoshd| 欧美一级艳片视频免费观看| 视频一区二区不卡| 日韩欧美在线1卡| 国产在线播放一区三区四| 国产欧美va欧美不卡在线| 91亚洲国产成人精品一区二区三| 国产精品动漫网站| 91精品福利视频| 日本欧美加勒比视频| 精品国产亚洲一区二区三区在线观看 | 欧洲人成人精品| 亚洲h动漫在线| 欧美大片一区二区三区| 国产福利一区二区三区视频| 综合激情成人伊人| 激情国产一区二区| 成人免费在线视频观看| 欧美制服丝袜第一页| 男女性色大片免费观看一区二区| 欧美mv和日韩mv的网站| 成人18精品视频| 亚洲成人av在线电影| 成人91在线观看| 石原莉奈一区二区三区在线观看| 日韩精品一区二区三区视频在线观看 | 一区二区不卡在线播放 | 国产精品激情偷乱一区二区∴| 不卡的av电影在线观看| 午夜av区久久| 国产午夜亚洲精品不卡| 欧美日韩在线三区| 国产一区二区三区四区五区入口| 亚洲美女屁股眼交3| 日韩一级免费观看| 94-欧美-setu| 加勒比av一区二区| 91精品国产福利| 99精品欧美一区二区蜜桃免费 | 色欲综合视频天天天| 国产福利91精品一区二区三区| 国产亚洲成av人在线观看导航| 国产麻豆视频一区二区| 亚洲国产精品精华液2区45| 欧美精品在线观看一区二区| 日本乱人伦一区| 成人免费av资源| 亚洲三级电影网站| 国产精品天干天干在观线| 精品国产乱码久久久久久1区2区| 2014亚洲片线观看视频免费| 欧美亚洲一区二区在线|