Hi !
It´s possible to open an c++ filestream (ifstream) instead of an XML file, and how ?!
Normally I open the file with this code:
TiXmlDocument doc(pFilename); bool loadOkay = doc.LoadFile();
Thank you for the help !
Greets
Yes, you can do this:
ifstream ifs(...);
TiXMLDocument doc; doc << ifs;
This works also with any kind of input stream ( including stringstream ) witch makes it very handy....
Log in to post a comment.
Hi !
It´s possible to open an c++ filestream (ifstream) instead of an XML file, and how ?!
Normally I open the file with this code:
TiXmlDocument doc(pFilename);
bool loadOkay = doc.LoadFile();
Thank you for the help !
Greets
Yes, you can do this:
ifstream ifs(...);
TiXMLDocument doc;
doc << ifs;
This works also with any kind of input stream ( including stringstream ) witch makes it very handy....