Menu

Loading/saving to memory pointer

Developer
2004-11-06
2013-05-20
  • Alexey Menshikov

    Hello there, i need an advice.
    Im use tinyXML (and its great!) for one project as preset file format container.
    Now, due to specs change, i have use host app chunks to save/load preset. I dont want change format and would like to save/load whole xml to memory.

    Exploring Document class load/save functions i found that i could use Parse( data.c_str() ); for load and Print( fp, 0 ); for save but how i could get the size of whole xml to save?  Will the sizeof() work?

    Thanks in advance,
    Alex

     
    • Yves Berquin

      Yves Berquin - 2004-11-06

      The only way I can think of is first to store the whole XML tree in a string, then to ask the size of the string.

       
    • Ellers

      Ellers - 2004-11-06

      If you're saving in memory anyway, you could just keep a handle on the root document object, and never need to write to a string/parse the string?

       

Log in to post a comment.

MongoDB Logo MongoDB