TiXmlElement *elem = new TiXmlElement("name"); TiXmlText *text = new TiXmlText("Hello World"); elem->LinkEndChild(text); TiXmlPrinter printer; elem->Accept( &printer ); std::string stringBuffer = printer.CStr(); cout<<stringBuffer;输出结果: <name>Hello World</name>
TiXmlPrinter 使用方法
最新推荐文章于 2022-05-07 11:42:55 发布