From: Robert Ramey (ramey_at_[hidden])
Date: 2008-05-15 16:44:12
There's some confusion here, the name in name value pair is used for the
name data - not the typename.
In any case, you might try deriving from xml_oachive and re-implement the
typedef detail::common_oarchive<Archive> detail_common_oarchive;
::boost::serialization::nvp<my_type> & t,
save_start(t.name()); // t.name includes "item" replace with whatever you
choose like "my_type" + t.name
Of course this would likely have all manner of undesired side-effects - like
changing ALL the tags for this type - not just "item". And of course it
would only work for my_type, etc.,etc.
Chris Weed wrote:
> I am interested in using the xml serialization code for std::vector,
> but currently it is hard-coded to name items, "item".
> Is this customizable by overloading/specializing make_nvp for my type
> to replace "item" with a type-specific name?
> I tried the following code which didn't accomplish this.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk