Boost logo

Boost Users :

From: Richard Jennings (richard.jennings_at_[hidden])
Date: 2005-10-21 03:22:30


I think it might be the function I've cut out below. Try using
boost:serialization::make_nvp
in place of the macro:

ar & boost::serialization::make_nvp("base",
boost::serialization::base_object<base>(*this));

The macro uses the parameter as the name for the XML element. Because
it's a templated type
then the angle brackets are probably included in the name, which would be
invalid XML
syntax.

Richard

On Fri, 21 Oct 2005 03:26:05 +0100, Piyush Kapadia
<piyush.kapadia_at_[hidden]> wrote:

> Following code results in "unrecognized XML syntax" exception while
> writing
> to XML file.
[snip]
> void serialize(Archive & ar, const unsigned int version)
>
> {
>
> ar &
> BOOST_SERIALIZATION_NVP(boost::serialization::base_object<base>(*this));
>
> ar & BOOST_SERIALIZATION_NVP(hmap);
>
> }
>


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