开发者

Can TinyXml load Xml from string instead of file?

开发者 https://www.devze.com 2022-12-31 19:06 出处:网络
I\'m using TinyXml library for my app开发者_如何转开发lication 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 you ve

I'm using TinyXml library for my app开发者_如何转开发lication 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 you very much

Tu.


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

精彩评论

暂无评论...
验证码 换一张
取 消