XmlWriter(const char * xml = 0) | 原型 | XmlWriter(const char * xml = 0) | | 描述 | 构建XmlWriter对象 | | 参数 | [i]const char * xml = 0:xml文件名 | | 返回值 | 无 | void clone(XmlReader * pReader) | 原型 | void clone(XmlReader * pReader) | | 描述 | 共享pReader的文档引擎 | | 参数 | [i]XmlReader * pReader: XmlReader对象 | | 返回值 | 无 | void save() | 原型 | void save() | | 描述 | 将文档引擎的所有数据保存为xml文件 | | 参数 | 无 | | 返回值 | 无 | void setFile(const char * xml) | 原型 | void setFile(const char * xml) | | 描述 | 设置xml文件路径名,此时会清空现有数据,并且重置文档引擎共享标志(不共享) | | 参数 | [i]const char * xml: xml文件路径名 | | 返回值 | 无 | const char * getFileName() | 原型 | const char * getFileName() | | 描述 | 获取xml文件路径名 | | 参数 | 无 | | 返回值 | xml文件路径名 | void setRoot(const char * root,const char * name = 0, const char * att = 0) | 原型 | void setRoot(const char * root,const char * name = 0, const char * att = 0) | | 描述 | 设置文档引擎的根元素 | | 参数 | [i]const char * root: 根元素的标签 \\ [i]const char * name = 0: 根元素的属性 \\ [i] const char * att = 0: 属性值 | | 返回值 | 无 | XmlElement * addElement(XmlElement * pParent, const char * tag,const char * text = 0) | 原型 | XmlElement * addElement(XmlElement * pParent, const char * tag,const char * text = 0) | | 描述 | 给指定xml元素添加子元素,该子元素标签为tag,文本内容为text | | 参数 | [i]XmlElement * pParent: 父元素 \\ [i] const char * tag: 子元素的标签 \\ [i]const char * text = 0: 子元素的文本内容 | | 返回值 | 添加的子元素指针 | XmlElement * addElement(XmlElement * pParent, const char * tag,int v) | 原型 | XmlElement * addElement(XmlElement * pParent, const char * tag,int v) | | 描述 | 给指定xml元素添加子元素,该子元素标签为tag,内容为整数v | | 参数 | [i]XmlElement * pParent: 父元素 \\ [i] const char * tag: 子元素的标签 \\ [i]int v: 子元素的整数内容 | | 返回值 | 添加的子元素指针 | XmlElement * addElement(XmlElement * pParent, const char * tag,double v) | 原型 | XmlElement * addElement(XmlElement * pParent, const char * tag,double v) | | 描述 | 给指定xml元素添加子元素,该子元素标签为tag,内容为浮点数v | | 参数 | [i]XmlElement * pParent: 父元素 \\ [i] const char * tag: 子元素的标签 \\ [i]double v: 子元素的浮点数内容 | | 返回值 | 添加的子元素指针 | XmlElement * addUIElement(XmlElement * pParent, const char * name,const char * label,int type,int v) | 原型 | XmlElement * addUIElement(XmlElement * pParent, const char * name,const char * label,int type,int v) | | 描述 | 该函数为定制GUI的配置文件专用接口,添加一个名称为name,显示标签为label,类型为type,初始值为v的控件条目 | | 参数 | [i]XmlElement * pParent: 父元素 \\ [i] const char * name: 控件名 \\ [i]const char * label: 控件显示标签 \\ [i]int type: 控件类型 \\ [i]int v: 初始整数值 | | 返回值 | 控件条目所对应的xml元素 | XmlElement * addUIElement(XmlElement * pParent, const char * name,const char * label,int type,double v) | 原型 | XmlElement * addUIElement(XmlElement * pParent, const char * name,const char * label,int type,double v) | | 描述 | 该函数为定制GUI的配置文件专用接口,添加一个名称为name,显示标签为label,类型为type,初始值为v的控件条目 | | 参数 | [i]XmlElement * pParent: 父元素 \\ [i] const char * name: 控件名 \\ [i]const char * label: 控件显示标签 \\ [i]int type: 控件类型 \\ [i]double v: 初始浮点数值 | | 返回值 | 控件条目所对应的xml元素 | XmlElement * addUIElement(XmlElement * pParent, const char * name,const char * label,int type,const char * v = 0) | 原型 | XmlElement * addUIElement(XmlElement * pParent, const char * name,const char * label,int type,const char * v = 0) | | 描述 | 该函数为定制GUI的配置文件专用接口,添加一个名称为name,显示标签为label,类型为type,初始值为v的控件条目 | | 参数 | [i]XmlElement * pParent: 父元素 \\ [i] const char * name: 控件名 \\ [i]const char * label: 控件显示标签 \\ [i]int type: 控件类型 \\ [i]const char * v = 0: 初始字符串值 | | 返回值 | 控件条目所对应的xml元素 | void removeElement(XmlElement * pElem) | 原型 | void removeElement(XmlElement * pElem) | | 描述 | 删除指定xml元素以及它所拥有的所有子元素 | | 参数 | [i]XmlElement * pElem: xml元素 | | 返回值 | 无 | void addStringAttribute(XmlElement * pElement,const char * name,const char * att) | 原型 | void addStringAttribute(XmlElement * pElement,const char * name,const char * att) | | 描述 | 给xml元素添加属性名为name属性值为att的属性 | | 参数 | [i]XmlElement * pElement: xml元素 \\ [i]const char * name: 属性名 \\ [i]const char * att: 文本属性值 | | 返回值 | 无 | void addDoubleAttribute(XmlElement * pElement,const char * name,double att) | 原型 | void addDoubleAttribute(XmlElement * pElement,const char * name,double att) | | 描述 | 给xml元素添加属性名为name属性值为att的属性 | | 参数 | [i]XmlElement * pElement: xml元素 \\ [i]const char * name: 属性名 \\ [i]double att: 浮点数属性值 | | 返回值 | 无 | void addIntAttribute(XmlElement * pElement,const char * name,int att) | 原型 | void addIntAttribute(XmlElement * pElement,const char * name,int att) | | 描述 | 给xml元素添加属性名为name属性值为att的属性 | | 参数 | [i]XmlElement * pElement: xml元素 \\ [i]const char * name: 属性名 \\ [i]int att: 整数属性值 | | 返回值 | 无 |