//-----------------------------------------------------------------------------+ // Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd. // = FileName : TXmlTree.h // = Version : ver1.0 // = Author : xlc // = CreateDate : // = Description: // = Maintainers: // //-----------------------------------------------------------------------------+ #ifndef _TXMLTREE #define _TXMLTREE //合成器 class GEOAPI TXmlTree { public: TXmlTree(); virtual ~TXmlTree(); public: CString GetXml(); POSITION GetRootItem(); // void SetDeclaration(LPCTSTR pszVer=_T("1.0"),LPCTSTR pszEncoding=_T("GB2312")); CString GetDeclaration() const; // void SetComment(LPCTSTR pszComment); CString GetCommnet() const; BOOL SetItemText(POSITION posItem,LPCTSTR pszText); CString GetItemText(POSITION posItem) const; BOOL SetAttribute(POSITION posItem,LPCTSTR pszKey,LPCTSTR pszVal); CString GetAttribute(POSITION posItem,LPCTSTR pszKey) const; POSITION Insert(LPCTSTR pszItem,POSITION posParent,POSITION posInsertAfter); BOOL ItemHasChildren(POSITION posItem) const; POSITION GetChildItem(POSITION posParent) const; POSITION GetParentItem(POSITION posItem) const; POSITION GetNextSiblingItem(POSITION posItem) const; POSITION GetPrevSiblingItem(POSITION posItem) const; BOOL DeleteItem(POSITION posItem); BOOL DeleteAllItems(); UINT GetCount() const; protected: CString m_sDeclaration; //声明 CString m_sComment; //注释 CPtrList m_lstItemPtrs; //节点链表 }; #endif