boost_serializationを画面やメモリに出力したいのですが教えて下さい
test_classは別に定義してあるとします。これだとファイル出力です

#include <fstream>
#include <string>

int main()
{
std::ofstream fp("XXX.xml");
boost::archive::xml_oarchive oarchive(fp);

test_class Z;
Z.a = 22; Z.b = 7;

oarchive << boost::serialization::make_nvp("Root", Z);

}