I'm trying to print a xml to a file using rapidxml
.
But the values are in wstring
. So i've used templated version of it by attaching
xml_node wchar_t
instead of specialization of the xml_node .
But When i'm doing this:
std::string xml_as_string;
rapidxml::print<std::string,wchar_t>(std::back_inserter(xml_as_string), doc); ///i'm not very sure of this line . This line only gives a error
// i tried this "rapidxml::print<t>" also i'm getting an error .
//Save to file
std::ofstream file_stored("C:\\Logs\\file_stored.xml");
file_stored << doc;
file_stored.close();
doc.clear();
It throws a error stating Error:
error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'rapidxml::xml_document<Ch>' (or there is no acceptable conversion).
Any help will be appreciated . thanks