Search code examples
c++xmltinyxml

Avoid escaping \" to " in tinyxml writing in C++


I use tinyxml to write xml files. For a tag I want to write <tag>""</tag>, but when I use following codes

TiXmlElement *tag=new TiXmlElement("tag");
TiXmlText *text=new TiXmlText("\"\"");

The content will be <tag>&quot;&quot;</tag>. If I use

TiXmlText *text=new TiXmlText("");

The content will be <tag/>

How can I just write the quotes (") in xml?


Solution

  • Since no update on this problem, the work-around to edit the generated xml files seems a doable approach, either by hand or with another program.