I'm using tinyxml2 in my after effects plugin to parse xml files. But I can't seem to get the XMLDocument object to load my xml file. The "loadFile" function can read the whole content of my file. but when I call the "toText" method, it returns null. Here's a snippet of my code.
tinyxml2::XMLDocument envXml;
envXml.LoadFile("D:/~env.xml");
XMLText*text = envXml.ToText();//return null
XMLNode*srcChild = envXml.LastChild();
XMLElement*srcElement = srcChild->ToElement();// crash
here's my xml file content:
<xml>
<rs_tpl>some text
<t>test</t>
</rs_tpl>
<logo_path>some text</logo_path>
<src>some text</src>
<dst>some text</dst>
<out_path>some text</out_path>
<out_comp>some text</out_comp>
</xml>
What I'm doing wrong?