[serialization] Problem switching from one archive format to the other

Hello, I'm using boost::serialisation, currently with xml_archive. To make a performance test, I tried to switch to another archive format, namely text_archive. However, I cannot read the archive file any longer. Here are the beginnings of both files : ******XML : <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="3"> <GlobalContext class_id="0" tracking_level="0" version="0"> <Pointer class_id="2" class_name="CContainer2[basic]" tracking_level="1" version="0" object_id="_0"> ******Text: 22 serialization::archive 3 0 0 2 18 CContainer2[basic] 1 0 I tried to debug the problem, and could see that the number 2 was incorrectly interpreted as the version of the class GlobalContext, instead of the Id of the following class. It looks like there is a missing 0 in the text file. Does someone have any idea where it may come from ? FYI, I'm using VC++8.0. Best regards, -- Loïc

Its possible the the save/load of the serialization functions don't match. Since XML has redundancy that text archives don't, sometimes xml archives will work when the "shouldn't". Double check your serialization functions. Robert Ramey Loïc Joly wrote:
participants (2)
-
Loïc Joly
-
Robert Ramey