PDA

View Full Version : XML vs file sotring settings



^NyAw^
7th May 2009, 16:22
Hi,

I have my application that stores/reloads a projecte file using QDataStream.
I'm not sure how to do it using XML, but my question is: Why I would use XML instead of writing to a binary file?

Thanks,

mcosta
7th May 2009, 16:42
Using XML files has several advantages:

XML files are human readable;
Binary files can be corrupted and become not readable;
Qt offers many utilities to interact with XML files.

^NyAw^
7th May 2009, 17:10
Hi,

Will read how to use it and try.

Thanks,

Lykurg
7th May 2009, 17:13
If you don't want do deal with all that xml stuff, you also can use QSettings with QSettings::IniFormat and have all advantages of an xml file but it's much more easier to use.