Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can TinyXml load Xml from string instead of file?

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 you very much

Tu.

like image 618
user339996 Avatar asked May 19 '10 04:05

user339996


1 Answers

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

like image 94
volody Avatar answered Oct 24 '22 03:10

volody