bug of RapidXML when the value of a xml node is null
If the value of node in the xml is null, when we print the xml node, the node has no start tag, but only the end tag. For example:
xml_document<char> doc;
doc.append_node(doc.allocate_node(rapidxml::node_element, "mynode", ""));
ofstream ofs("t开发者_如何学Pythonest.xml");
ofs<<doc;
the content of test.xml is:
</mynode>
the expected content of test.xml is
<mynode></mynode>
Is this a bug of rapidxml
I do not know what version of RapidXml you're using. I've used few days ago the latest and works fine... this problem was fixed or it was a particular case of yours :)
精彩评论