我对TinyXml相当陌生,而且遇到了一些问题。我正在尝试学习如何创建和读取文件。 我可以从这个例子中读取数据 <?xml version="1.0" standalone=no>
<!-- Our to do list data -->
<ToDo>
<Item priority="1"> Go to the <bold>Toy store!</bold></Item>
加载字符串 是否有可能从tinyXML文件中将字符串加载到应用程序中的字符串变量,因为当我试图做到这一点时,我收到了一些错误。 if (fall->QueryFloatAttribute("particle_texture", std::string name_) != XML_NO_ERROR)
return false;
错误是:“type is not allowed”。你能
在TinyXmlv1我可以 TiXmlDocument doc;
TiXmlElement * element = new TiXmlElement("Hello");
TiXmlText * text = new TiXmlText("World");
element->LinkEndChild(text);
doc.Parse("<TAGS></TAGS>"); // It OK