XmlReader(const char * xml)

原型 XmlReader(const char * xml)
描述 构建对象
参数 [i]const char * xml: xml文件名
返回值

void clone(XmlWriter * pWriter)

原型 void clone(XmlWriter * pWriter)
描述 与XmlWriter对象共享文档引擎,方便同时对某个xml文件进行读写操作。
参数 [i]XmlWriter * pWriter: 被共享文档引擎的XmlWriter对象
返回值

void parse()

原型 void parse()
描述 由文档引擎解析xml文件。在获取xml数据之前,必须调用该函数。
参数
返回值

void setFile(const char * xml)

原型 void setFile(const char * xml)
描述 设置xml文件名
参数 [i]const char * xml: xml文件名
返回值

const char * getText(XmlElement * pElement)

原型 const char * getText(XmlElement * pElement)
描述 获取指定Xml元素的文本内容
参数 [i]XmlElement * pElement: xml元素
返回值 指定xml元素的文本内容

int getIntValue(XmlElement * pElement)

原型 int getIntValue(XmlElement * pElement)
描述 获取指定xml元素内容的整数值,由文本内容转化得到
参数 [i]XmlElement * pElement: xml元素
返回值 指定xml元素内容的整数值

double getDoubleValue(XmlElement * pElement)

原型 double getDoubleValue(XmlElement * pElement)
描述 获取指定xml元素内容的浮点数值,由文本内容转化得到
参数 [i]XmlElement * pElement: xml元素
返回值 指定xml元素内容的浮点数值

const char * getStringAttribute(XmlElement * pElement,const char * name)

原型 const char * getStringAttribute(XmlElement * pElement,const char * name)
描述 获取指定xml元素属性name的字符串属性值
参数 [i]XmlElement * pElement: xml元素
[i]const char * name: 属性名
返回值 与属性name对应的字符串属性值

double getDoubleAttribute(XmlElement * pElement,const char * name)

原型 double getDoubleAttribute(XmlElement * pElement,const char * name)
描述 获取指定xml元素属性name的浮点数属性值
参数 [i]XmlElement * pElement: xml元素
[i]const char * name: 属性名
返回值 与属性name对应的浮点数属性值

int getIntAttribute(XmlElement * pElement,const char * name)

原型 int getIntAttribute(XmlElement * pElement,const char * name)
描述 获取指定xml元素属性name的整数属性值
参数 [i]XmlElement * pElement: xml元素
[i]const char * name: 属性名
返回值 与属性name对应的整数属性值

const char * getTag(XmlElement * pElement)

原型 const char * getTag(XmlElement * pElement)
描述 获取指定xml元素的标签字符串
参数 [i]XmlElement * pElement: xml元素
返回值 pElement的标签字符串

int getChildCount(XmlElement * pElement,const char * filter = 0)

原型 int getChildCount(XmlElement * pElement,const char * filter = 0)
描述 获取指定xml元素的子元素的个数
参数 [i]XmlElement * pElement: xml元素
[i]const char * filter = 0: 元素过滤器,只统计标签为filter的子元素,当filter为空的时候统计所有的子元素。但是不会递归调用
返回值 子元素的个数

XmlElement * getChild(XmlElement * pParent,const char * filter = 0,int index = 0)

原型 XmlElement * getChild(XmlElement * pParent,const char * filter = 0,int index = 0)
描述 获取指定xml元素标签为filter的第index个子元素,0-base。如果标签为空,则index从所有的子元素计数。
参数 [i]XmlElement * pParent: 指定的xml元素
[i]const char * filter = 0: 过滤标签
[i]int index = 0: 指定序号
返回值 pParent的子元素中第index个标签为filter的子元素

XmlElement * getNext(XmlElement * pElem)

原型 XmlElement * getNext(XmlElement * pElem)
描述 获取指定xml元素的下一个元素,在文档引擎的属性结构中,他们为同一层次。
参数 [i]XmlElement * pElem: xml元素
返回值 pElem的下一个元素

XmlElement * search(const char * tag,const char * atb,int intAtb,XmlElement * pPar = 0)

原型 XmlElement * search(const char * tag,const char * atb,int intAtb,XmlElement * pPar = 0)
描述 在指定xml元素的子元素中寻找标签为tag,属性atb的属性值为intAtb的子元素
参数 [i]const char * tag: 标签
[i]const char * atb: 属性名
[i]int intAtb: 整数属性值
[i]XmlElement * pPar = 0:xml元素,如果为空,则从当前文档引擎所有的元素中寻找
返回值 匹配指定参数的xml元素,若没有则返回0

XmlElement * search(const char * tag,const char * atb, const char * strAtb,XmlElement * pPar = 0)

原型 XmlElement * search(const char * tag,const char * atb, const char * strAtb,XmlElement * pPar = 0)
描述 在指定xml元素的子元素中寻找标签为tag,属性atb的属性值为strAtb的子元素
参数 [i]const char * tag: 标签
[i]const char * atb: 属性名
[i]const char * strAtb: 字符串属性值
[i]XmlElement * pPar = 0: xml元素,如果为空,则从当前文档引擎所有的元素中寻找
返回值 匹配指定参数的xml元素,若没有则返回0