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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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.
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?