#include #include #include #include void f(const std::string& xml) { try { std::string str; boost::archive::xml_iarchive(std::istringstream(xml)) >> boost::serialization::make_nvp("str", str); std::cout << str << std::endl; } catch(boost::archive::archive_exception& e) { std::cout << e.what() << std::endl; } } int main() { // deserialize some xml, which was created using xml_oarchive f("" "" "" "deserialize successfull" ""); // the same xml, but attributes of reorderd f("" "" "" "deserialize successfull" ""); return 0; }