【发布时间】:2011-11-18 20:53:26
【问题描述】:
例如:
test.xml
<fruit taste="good">whatever</fruit>
如何使用 TinyXML 获取标签“fruit”(当然是“fruit”)的名称字符串?
【问题讨论】:
例如:
test.xml
<fruit taste="good">whatever</fruit>
如何使用 TinyXML 获取标签“fruit”(当然是“fruit”)的名称字符串?
【问题讨论】:
Value 函数根据类型返回不同的东西。
Document: filename of the xml file
Element: name of the element
Comment: the comment text
Unknown: the tag contents
Text: the text string
【讨论】:
const std:string&而不是const char *。它也更有效率。