It really is. What for? This simplifies the life of applications that will process the output from an XML file - they just do not need to worry about the format in which newlines are used, increasing application compatibility (let's consider the compatibility of simple text editors between Linux and Windows - they almost always display files incorrectly, on Windows, most often as a single line).
Of course, if for some reason you need to have \ r unconverted, then just take any existing XML parser implementation and modify it. In tinyxml you need to change the function TiXmlBase :: ReadText (), or you can take its older version, as it left unused spaces.
On the other hand, from a design point of view, it would be much easier to just start the parser output through the character replacement function and replace all "\ n" with "\ r \ n".
Of course, it would be best to just use the output as is, right now I can not imagine a single scenario where it would be necessary.
source share