Files
envi-code/SourceCode/Code2026/inc/AdsXRx/XmlTree.h
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

63 lines
1.6 KiB
C++

//-----------------------------------------------------------------------------+
// 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();
//<?xml version="1.0" encoding="UTF-8"?>
void SetDeclaration(LPCTSTR pszVer=_T("1.0"),LPCTSTR pszEncoding=_T("GB2312"));
CString GetDeclaration() const;
//<!-- Copy text, comments and processing instructions. -->
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