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

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

?? tinyxml.h

?? xml 簡單解析器
?? H
?? 第 1 頁 / 共 4 頁
字號:
/*
www.sourceforge.net/projects/tinyxml
Original code (2.0 and earlier )copyright (c) 2000-2002 Lee Thomason (www.grinninglizard.com)

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.

Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.

2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.

3. This notice may not be removed or altered from any source
distribution.
*/


#ifndef TINYXML_INCLUDED
#define TINYXML_INCLUDED

#ifdef _MSC_VER
#pragma warning( push )
#pragma warning( disable : 4530 )
#pragma warning( disable : 4786 )
#endif

#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

// Help out windows:
#if defined( _DEBUG ) && !defined( DEBUG )
#define DEBUG
#endif

#ifdef TIXML_USE_STL
	#include <string>
 	#include <iostream>
	#define TIXML_STRING	std::string
	#define TIXML_ISTREAM	std::istream
	#define TIXML_OSTREAM	std::ostream
#else
	#include "tinystr.h"
	#define TIXML_STRING	TiXmlString
	#define TIXML_OSTREAM	TiXmlOutStream
#endif

// Deprecated library function hell. Compilers want to use the
// new safe versions. This probably doesn't fully address the problem,
// but it gets closer. There are too many compilers for me to fully
// test. If you get compilation troubles, undefine TIXML_SAFE

#define TIXML_SAFE		// TinyXml isn't fully buffer overrun protected, safe code. This is work in progress.
#ifdef TIXML_SAFE
	#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
		// Microsoft visual studio, version 2005 and higher.
		#define TIXML_SNPRINTF _snprintf_s
		#define TIXML_SNSCANF  _snscanf_s
	#elif defined(_MSC_VER) && (_MSC_VER >= 1200 )
		// Microsoft visual studio, version 6 and higher.
		//#pragma message( "Using _sn* functions." )
		#define TIXML_SNPRINTF _snprintf
		#define TIXML_SNSCANF  _snscanf
	#elif defined(__GNUC__) && (__GNUC__ >= 3 )
		// GCC version 3 and higher.s
		//#warning( "Using sn* functions." )
		#define TIXML_SNPRINTF snprintf
		#define TIXML_SNSCANF  snscanf
	#endif
#endif	

class TiXmlDocument;
class TiXmlElement;
class TiXmlComment;
class TiXmlUnknown;
class TiXmlAttribute;
class TiXmlText;
class TiXmlDeclaration;
class TiXmlParsingData;

const int TIXML_MAJOR_VERSION = 2;
const int TIXML_MINOR_VERSION = 4;
const int TIXML_PATCH_VERSION = 3;

/*	Internal structure for tracking location of items 
	in the XML file.
*/
struct TiXmlCursor
{
	TiXmlCursor()		{ Clear(); }
	void Clear()		{ row = col = -1; }

	int row;	// 0 based.
	int col;	// 0 based.
};


// Only used by Attribute::Query functions
enum 
{ 
	TIXML_SUCCESS,
	TIXML_NO_ATTRIBUTE,
	TIXML_WRONG_TYPE
};


// Used by the parsing routines.
enum TiXmlEncoding
{
	TIXML_ENCODING_UNKNOWN,
	TIXML_ENCODING_UTF8,
	TIXML_ENCODING_LEGACY
};

const TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN;

/** TiXmlBase is a base class for every class in TinyXml.
	It does little except to establish that TinyXml classes
	can be printed and provide some utility functions.

	In XML, the document and elements can contain
	other elements and other types of nodes.

	@verbatim
	A Document can contain:	Element	(container or leaf)
							Comment (leaf)
							Unknown (leaf)
							Declaration( leaf )

	An Element can contain:	Element (container or leaf)
							Text	(leaf)
							Attributes (not on tree)
							Comment (leaf)
							Unknown (leaf)

	A Decleration contains: Attributes (not on tree)
	@endverbatim
*/
class TiXmlBase
{
	friend class TiXmlNode;
	friend class TiXmlElement;
	friend class TiXmlDocument;

public:
	TiXmlBase()	:	userData(0) {}
	virtual ~TiXmlBase()					{}

	/**	All TinyXml classes can print themselves to a filestream.
		This is a formatted print, and will insert tabs and newlines.
		
		(For an unformatted stream, use the << operator.)
	*/
	virtual void Print( FILE* cfile, int depth ) const = 0;

	/**	The world does not agree on whether white space should be kept or
		not. In order to make everyone happy, these global, static functions
		are provided to set whether or not TinyXml will condense all white space
		into a single space or not. The default is to condense. Note changing this
		values is not thread safe.
	*/
	static void SetCondenseWhiteSpace( bool condense )		{ condenseWhiteSpace = condense; }

	/// Return the current white space setting.
	static bool IsWhiteSpaceCondensed()						{ return condenseWhiteSpace; }

	/** Return the position, in the original source file, of this node or attribute.
		The row and column are 1-based. (That is the first row and first column is
		1,1). If the returns values are 0 or less, then the parser does not have
		a row and column value.

		Generally, the row and column value will be set when the TiXmlDocument::Load(),
		TiXmlDocument::LoadFile(), or any TiXmlNode::Parse() is called. It will NOT be set
		when the DOM was created from operator>>.

		The values reflect the initial load. Once the DOM is modified programmatically
		(by adding or changing nodes and attributes) the new values will NOT update to
		reflect changes in the document.

		There is a minor performance cost to computing the row and column. Computation
		can be disabled if TiXmlDocument::SetTabSize() is called with 0 as the value.

		@sa TiXmlDocument::SetTabSize()
	*/
	int Row() const			{ return location.row + 1; }
	int Column() const		{ return location.col + 1; }	///< See Row()

	void  SetUserData( void* user )			{ userData = user; }
	void* GetUserData()						{ return userData; }

	// Table that returs, for a given lead byte, the total number of bytes
	// in the UTF-8 sequence.
	static const int utf8ByteTable[256];

	virtual const char* Parse(	const char* p, 
								TiXmlParsingData* data, 
								TiXmlEncoding encoding /*= TIXML_ENCODING_UNKNOWN */ ) = 0;

	enum
	{
		TIXML_NO_ERROR = 0,
		TIXML_ERROR,
		TIXML_ERROR_OPENING_FILE,
		TIXML_ERROR_OUT_OF_MEMORY,
		TIXML_ERROR_PARSING_ELEMENT,
		TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME,
		TIXML_ERROR_READING_ELEMENT_VALUE,
		TIXML_ERROR_READING_ATTRIBUTES,
		TIXML_ERROR_PARSING_EMPTY,
		TIXML_ERROR_READING_END_TAG,
		TIXML_ERROR_PARSING_UNKNOWN,
		TIXML_ERROR_PARSING_COMMENT,
		TIXML_ERROR_PARSING_DECLARATION,
		TIXML_ERROR_DOCUMENT_EMPTY,
		TIXML_ERROR_EMBEDDED_NULL,
		TIXML_ERROR_PARSING_CDATA,

		TIXML_ERROR_STRING_COUNT
	};

protected:

	// See STL_STRING_BUG
	// Utility class to overcome a bug.
	class StringToBuffer
	{
	  public:
		StringToBuffer( const TIXML_STRING& str );
		~StringToBuffer();
		char* buffer;
	};

	static const char*	SkipWhiteSpace( const char*, TiXmlEncoding encoding );
	inline static bool	IsWhiteSpace( char c )		
	{ 
		return ( isspace( (unsigned char) c ) || c == '\n' || c == '\r' ); 
	}
	inline static bool	IsWhiteSpace( int c )
	{
		if ( c < 256 )
			return IsWhiteSpace( (char) c );
		return false;	// Again, only truly correct for English/Latin...but usually works.
	}

	virtual void StreamOut (TIXML_OSTREAM *) const = 0;

	#ifdef TIXML_USE_STL
	    static bool	StreamWhiteSpace( TIXML_ISTREAM * in, TIXML_STRING * tag );
	    static bool StreamTo( TIXML_ISTREAM * in, int character, TIXML_STRING * tag );
	#endif

	/*	Reads an XML name into the string provided. Returns
		a pointer just past the last character of the name,
		or 0 if the function has an error.
	*/
	static const char* ReadName( const char* p, TIXML_STRING* name, TiXmlEncoding encoding );

	/*	Reads text. Returns a pointer past the given end tag.
		Wickedly complex options, but it keeps the (sensitive) code in one place.
	*/
	static const char* ReadText(	const char* in,				// where to start
									TIXML_STRING* text,			// the string read
									bool ignoreWhiteSpace,		// whether to keep the white space
									const char* endTag,			// what ends this text
									bool ignoreCase,			// whether to ignore case in the end tag
									TiXmlEncoding encoding );	// the current encoding

	// If an entity has been found, transform it into a character.
	static const char* GetEntity( const char* in, char* value, int* length, TiXmlEncoding encoding );

	// Get a character, while interpreting entities.
	// The length can be from 0 to 4 bytes.
	inline static const char* GetChar( const char* p, char* _value, int* length, TiXmlEncoding encoding )
	{
		assert( p );
		if ( encoding == TIXML_ENCODING_UTF8 )
		{
			*length = utf8ByteTable[ *((unsigned char*)p) ];
			assert( *length >= 0 && *length < 5 );
		}
		else
		{
			*length = 1;
		}

		if ( *length == 1 )
		{
			if ( *p == '&' )
				return GetEntity( p, _value, length, encoding );
			*_value = *p;
			return p+1;
		}
		else if ( *length )
		{
			//strncpy( _value, p, *length );	// lots of compilers don't like this function (unsafe),
												// and the null terminator isn't needed
			for( int i=0; p[i] && i<*length; ++i ) {
				_value[i] = p[i];
			}
			return p + (*length);
		}
		else
		{
			// Not valid text.
			return 0;
		}
	}

	// Puts a string to a stream, expanding entities as it goes.
	// Note this should not contian the '<', '>', etc, or they will be transformed into entities!
	static void PutString( const TIXML_STRING& str, TIXML_OSTREAM* out );

	static void PutString( const TIXML_STRING& str, TIXML_STRING* out );

	// Return true if the next characters in the stream are any of the endTag sequences.
	// Ignore case only works for english, and should only be relied on when comparing
	// to English words: StringEqual( p, "version", true ) is fine.
	static bool StringEqual(	const char* p,
								const char* endTag,
								bool ignoreCase,
								TiXmlEncoding encoding );

	static const char* errorString[ TIXML_ERROR_STRING_COUNT ];

	TiXmlCursor location;

    /// Field containing a generic user pointer
	void*			userData;
	
	// None of these methods are reliable for any language except English.
	// Good for approximation, not great for accuracy.
	static int IsAlpha( unsigned char anyByte, TiXmlEncoding encoding );
	static int IsAlphaNum( unsigned char anyByte, TiXmlEncoding encoding );
	inline static int ToLower( int v, TiXmlEncoding encoding )
	{
		if ( encoding == TIXML_ENCODING_UTF8 )
		{
			if ( v < 128 ) return tolower( v );
			return v;
		}
		else
		{
			return tolower( v );
		}
	}
	static void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length );

private:
	TiXmlBase( const TiXmlBase& );				// not implemented.
	void operator=( const TiXmlBase& base );	// not allowed.

	struct Entity
	{
		const char*     str;
		unsigned int	strLength;
		char		    chr;
	};
	enum
	{
		NUM_ENTITY = 5,
		MAX_ENTITY_LENGTH = 6

	};
	static Entity entity[ NUM_ENTITY ];
	static bool condenseWhiteSpace;
};


/** The parent class for everything in the Document Object Model.
	(Except for attributes).
	Nodes have siblings, a parent, and children. A node can be

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久日产精品| 精品亚洲porn| 一区二区三区视频在线看| 亚洲午夜精品网| 国产一区二区三区综合| www.爱久久.com| 欧美肥妇free| 中文字幕免费不卡在线| 一区二区三区日韩精品| 欧美中文字幕一二三区视频| 日韩美女天天操| 一区二区在线观看免费视频播放| 精品一二线国产| 国产精品污污网站在线观看| 蜜桃精品在线观看| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 久久久精品tv| 91在线你懂得| 国产日产精品一区| 黄色日韩三级电影| 欧美精品在线观看播放| 韩国女主播一区二区三区| 亚洲欧洲精品天堂一级| 久久精品理论片| 欧美日韩国产另类不卡| 亚洲免费观看在线观看| 不卡大黄网站免费看| 亚洲精品一区二区三区蜜桃下载| 丝袜美腿亚洲一区二区图片| 99久久婷婷国产精品综合| 天天色综合成人网| 欧美一个色资源| 麻豆高清免费国产一区| 国产精品大尺度| 成人福利在线看| 日韩综合小视频| 亚洲视频你懂的| 91在线一区二区三区| 日韩成人免费电影| 91精品国产麻豆| 日韩黄色小视频| 中文字幕不卡一区| 日韩免费在线观看| 欧美中文字幕不卡| 成人免费视频一区二区| 欧美激情一区二区三区四区| 91麻豆精品国产自产在线观看一区 | 成人小视频在线观看| 亚洲成人免费av| 91精品国产欧美日韩| 成人av免费网站| 国产一区二区三区蝌蚪| 日韩中文字幕区一区有砖一区| 亚洲国产高清aⅴ视频| 精品国产91洋老外米糕| 欧美肥妇毛茸茸| 欧美视频在线播放| 美日韩黄色大片| 性做久久久久久免费观看 | 欧美偷拍一区二区| 99久久婷婷国产综合精品| 国产风韵犹存在线视精品| 国产精品视频第一区| 欧美成人一区二区三区片免费| 风流少妇一区二区| 亚洲精品视频一区| 日韩毛片精品高清免费| 一区在线播放视频| 中文字幕久久午夜不卡| 欧美极品aⅴ影院| 精品奇米国产一区二区三区| 制服丝袜亚洲网站| 欧美一个色资源| 欧美电视剧免费全集观看| 日韩你懂的电影在线观看| 日韩免费视频一区| 久久综合色之久久综合| 色成年激情久久综合| 狠狠色丁香婷婷综合| 久久国产夜色精品鲁鲁99| 久草中文综合在线| 国产精品一区二区久激情瑜伽| 亚洲一区在线视频| 久久久久久夜精品精品免费| 久久伊人中文字幕| 国产精品久久久久影院亚瑟| 综合色天天鬼久久鬼色| 亚洲欧美偷拍卡通变态| 亚洲一区二区三区不卡国产欧美| 一区二区三区91| 亚洲午夜精品网| 麻豆精品精品国产自在97香蕉| 久久99深爱久久99精品| 国产成人精品一区二区三区四区 | 91国内精品野花午夜精品| 欧美性受极品xxxx喷水| 欧美一级精品在线| 久久久久久**毛片大全| 亚洲老妇xxxxxx| 日韩在线播放一区二区| 国产一区二区三区国产| 99久久99久久免费精品蜜臀| 精品视频在线免费观看| 成人av资源在线观看| 日本精品免费观看高清观看| 6080午夜不卡| 久久久国产精品不卡| 亚洲欧美日本韩国| 久久激情五月婷婷| 99久久久久久99| 91精品欧美福利在线观看| 精品国产乱码久久久久久牛牛| 欧美国产精品专区| 五月婷婷色综合| 成人综合婷婷国产精品久久 | 久久国产人妖系列| 99久久精品免费| 精品视频在线免费看| 久久久精品人体av艺术| 亚洲成人资源在线| 成人综合日日夜夜| 3atv在线一区二区三区| 国产精品国产三级国产有无不卡| 三级一区在线视频先锋| 91在线无精精品入口| 久久色视频免费观看| 亚洲成人av在线电影| 成人美女在线视频| 国产日韩欧美综合在线| 亚洲午夜免费电影| 99视频在线精品| 精品不卡在线视频| 亚洲国产成人av网| 成人va在线观看| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 久久女同精品一区二区| 亚洲18影院在线观看| 91小视频在线免费看| 在线免费观看视频一区| 欧美国产日韩在线观看| 精品在线视频一区| 91麻豆精品国产91久久久久| 亚洲女同ⅹxx女同tv| www.日韩在线| 国产亚洲欧美在线| 亚洲人妖av一区二区| 久久99精品久久久久| 欧美人xxxx| 亚洲va天堂va国产va久| 欧美专区亚洲专区| 一区二区三区不卡视频| 91片黄在线观看| 国产精品久久久久永久免费观看| 国产伦精品一区二区三区免费| 91超碰这里只有精品国产| 亚洲成av人片在线观看无码| 在线亚洲欧美专区二区| 亚洲欧美日韩一区二区| 播五月开心婷婷综合| 久久九九全国免费| 成人在线一区二区三区| 国产无一区二区| 成人激情黄色小说| 中文字幕日韩精品一区| 成人午夜视频福利| 中文幕一区二区三区久久蜜桃| 成人听书哪个软件好| 国产精品网站在线播放| 91一区二区三区在线观看| 国产精品久久久久久久久晋中| 懂色中文一区二区在线播放| 国产人伦精品一区二区| 高清成人在线观看| 亚洲人成影院在线观看| 在线精品视频免费播放| 午夜免费久久看| 精品噜噜噜噜久久久久久久久试看 | 日本女优在线视频一区二区| 欧美变态凌虐bdsm| 国产伦精品一区二区三区免费| 国产片一区二区| 日本韩国欧美一区二区三区| 午夜精品久久久久久久99水蜜桃| 91精品国产色综合久久不卡电影 | 亚洲乱码一区二区三区在线观看| 91免费看`日韩一区二区| 一区二区三区中文在线| 欧美性大战xxxxx久久久| 美国毛片一区二区三区| 国产亚洲精品久| 在线国产亚洲欧美| 久久66热偷产精品| 国产精品久久久久aaaa| 欧美日韩一区三区| 极品少妇xxxx精品少妇| 亚洲欧洲精品一区二区三区| 51午夜精品国产| fc2成人免费人成在线观看播放| 亚洲成人一区二区在线观看| 久久免费的精品国产v∧|