Valid XML code for an element with empty content type (an element without child elements) are:
(with no space inbetween) but not
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):
<!-- mycomment -->
The correct XML code must be:
<elementname><!-- mycomment --></elementname>
without any whitespace or linefeeds inbetween.
The attached patch fixes this bug.
Log in to post a comment.