I'm trying to create XML file with TinyXML2.
string _text = "<body><foo><foo2>text</foo2></foo></body>";
XMLElement *body = xmlDoc->NewElement("body");
body->SetText(_text.c_str());
Give me:
<body>
<body><foo><foo2>text<foo2/><foo/><body/>
<body>
Is any way how to create empty element without top "body" and replace escape characters with <,>?