//-----------------------------------------------------------------------------+ // Copyright (C), 1998-2007, SH Software Co. Ltd. // = FileName : XmlTree.h // = Version : ver1.0 // = Author : zjq // = CreateDate : // = Description: // = Maintainers: // //-----------------------------------------------------------------------------+ #ifndef _XMLTREE #define _XMLTREE //合成器 class GEOAPI XmlTree { public: XmlTree(); virtual ~XmlTree(); 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