Menu

open filestreams in tinyXML

2008-07-10
2013-05-20
  • Peter Schmidl

    Peter Schmidl - 2008-07-10

    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

     
    • Filipe

      Filipe - 2008-07-17

      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.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.