If I have this test code:
TiXmlElement *parentElem = new TiXmlElement("ParentNode");
TiXmlElement *newElem = new TiXmlElement("TestNode");
TiXmlText *textElem = new TiXmlText("Test Content");
With the line commented I get output XML:
]Uncommenting the line I get:
Now ideally it would still all be one line, but I don't really mind it putting the CDATA content nested... but the fact indentation is screwed up on the closing [i]<TestNode>[/i] is a pain. Is this a controllable part of TinyXml, or a bug, or just the way it is?
Grr, formatting typo. No editing possible? Hopefully it's still clear.
That's a bug, albeit a minor one. TiXmlPrinter may work around the problem - it uses a different output path.