5

例如:

测试.xml

<fruit taste="good">whatever</fruit>

如何使用 TinyXML 获取标签“fruit”(当然是“fruit”)的名称字符串?

4

1 回答 1

15

使用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
于 2011-09-16T17:13:44.977 回答