Valid XML code for an element with empty content type (an element without child elements) are:
<elementname/>
or
<elementname></elementname>
(with no space inbetween) but not
<elementname>
</elementname>
because of the character content (Text-Node) consisting of spaces and/or linefeeds between the start and end tag.
This is correctly done by TinyXML on e.g. a SaveFile(...) action!
But if a comment or processing instruction is added as a child of elementname the following incorrect XML code in exported (it dose not validate by an XML schema parser if elementname is defined as empty content):
<elementname>
<!-- mycomment -->
</elementname>
The correct XML code must be:
<elementname><!-- mycomment --></elementname>
without any whitespace or linefeeds inbetween.
The attached patch fixes this bug.
Patch for TinyXML versoin 2.6.1
this patch is applied in 2.6.2