Actually, that may not be necessary.
There is Boost.PropertyTree that has basically that exact interface, and furthermore, it already works with the serializer!
Code:boost::property_tree::ptree pt; pt.put<std::string>("name", "Chris"); pt.put("age", 23); std::ofstream ofs("out.xml"); boost::archive::xml_oarchive xml(ofs); xml << BOOST_SERIALIZATION_NVP(pt);




Reply With Quote