Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-12-27 00:12:11


We would have to see more of the code to comment.

Merrill Cornish wrote:
> I've finally gotten serialization for XML archives to compile using
> Boost 1.33.1. Now I'm trying to execute the test. Unfortunately,
> the first archive output statement
>
> outArchive << BOOST_SERIALIZATION_NVP(testObj_out);
>
> triggers an exception saying, "unrecognized XML syntax". The
> output file looks like

very odd when writing the file !

>
> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
> <!DOCTYPE boost_serialization>
> <boost_serialization signature="serialization::archive" version="3">
> <testObj_out class_id="0" tracking_level="0" version="1">
> <px class_id="1" tracking_level="1" version="0"
> object_id="_0"</boost_serialization>
>
> Note that the closing ">" for the px element is missing, which
> is probably the reason why there is no newline before
> </boost_serialization>.
>
> The serialize() function for the class object being archived has
> one ar & for a base class plus three data members. So, it looks
> like serialization is going awry while string to write the initial
> class element and never gets to the class contents.

>
> By the way, I've never seen the XML root element
> (<boost_serialization>)
> with attributes. Is that standard?

any xml elements can have attributes

>
> Any ideas?
>
> Merrill


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net