void XmlParser::generateXmlString( RadioRepresentation &radio, std::string &xml) { try{ Document doc; //Create a declaration and insert it Declaration decl("1.0", "utf-8", "yes"); doc.InsertEndChild(decl); //Create the root softwareradio node and insert it Element softRad = writeSoftwareRadio(radio); doc.InsertEndChild(softRad); stringstream ss; ss << doc; xml = ss.str(); } catch( Exception& ex ) { LOG(LERROR) << ex.what(); } }