Actually, i have a c++ code which decode a xml from a xml file with TinyXML library.
std::string = "xmlFile.xml";
TiXmlDocument doc(xml_name);
bool loadOkay = doc.LoadFile();
if (loadOkay){...}
Where xmlFile.xml
<?xml version="1.0">
<body>
....
</body>
Now I need to decode the same xml, but now I have the xml contents atfunction input.
I have thought it would be something like:
std::string contents = "<?xml version="1.0"> <body> ... </body>";
TiXmlDocument doc(contents);
bool loadOkay = doc.LoadFile();
if (loadOkay){...}
But obviously, this not work so.
How can I solve this?