Can TinyXml load Xml from string instead of file?

后端 未结 1 1282
死守一世寂寞
死守一世寂寞 2021-02-07 05:11

I\'m using TinyXml library for my application but TiXmlDocument object just only can load Xml file. How can it load Xml from string. Could you tell me the way to do this. Thank

相关标签:
1条回答
  • 2021-02-07 05:45

    Instead of calling TiXmlDocument::LoadFile() you can use TiXmlDocument::Parse()

    TiXmlDocument doc;
    doc.Parse((const char*)filedata, 0, TIXML_ENCODING_UTF8);
    

    Check DotScene Loader with User Data Class

    0 讨论(0)
提交回复
热议问题