I am using boost write_xml
function to create xml. I am able to create successful xml using Boost. But It is adding extra unicode 0x0 character at end of xml child element.
code snippet:
boost::property_tree::write_xml(oss, pt, boost::property_tree::xml_writer_make_settings<std::string>(' ', 4));
I am sending this xml to Java Side application and Java throwing below exception error while parsing boost created xml.
An Invalid XML character(Unicode: 0x0) was found in the element content of the document error
Anyone know, how to remove unicode 0x0 character
from XML while creating xml using boost property ptree
.