如何在TinyXML中获得标记的名称?
How do I get the name of a tag in TinyXML?
本文关键字:TinyXML 更新时间:2023-10-16
例如:
test.xml
<fruit taste="good">whatever</fruit>
如何使用TinyXML获得标签"fruit"(当然是"fruit")的名称字符串?
使用TiXmlElement::Value()
Value函数根据类型返回不同的结果。
Document: filename of the xml file
Element: name of the element
Comment: the comment text
Unknown: the tag contents
Text: the text string
相关文章:
- 使用 Tinyxml 在 xml 中添加一个子子项
- 检查 TinyXML 中的元素是否存在
- TinyXML以及标签和格式问题
- TinyXML-2 使用样式表加载文件时出错
- 使用 TinyXML 读取所有同级元素
- 使用 TinyXML 解析 XML 元素 - 无限循环
- 如何使用TinyXML从XML文件中读取所有数据
- 深层通过tinyxml复制XML
- TinyXml:从XML文件中读取wstring
- 使用 TinyXML 查找特定的文本值
- 为什么tinyxml的FirstAttribute()在简单函数中返回null?
- TinyXMl中的多线程写入数据
- TinyXML在元素上循环
- 使用 TinyXML 在 XML 文档中查找特定节点
- 使用TinyXML获取分段错误
- TinyXml:错误代码 9
- TinyXML无法将属性与字符进行比较
- TinyXML 从文件加载字符串
- TinyXML - 任何跳过有问题的DOCTYPE标签的方法
- 使用 TinyXML 从C++类生成 XML