double spaces are replaced with single space
Brought to you by:
leethomason
Hi,
I'm using tinyxml inside crtmpserver project (http://rtmpd.com/who-did-what/)
I discovered a problem. When de-serializing a XML, double spaces from text nodes are replaced with single spaces. Actually, any consecutive number of spaces are replaced with single space. The XML was generated using tinyxml. So, the serializer clearly stores them untouched. The deserializer should generate identical values, but is not doing that.
Here is a sample XML file:
http://pastebin.com/BByK1E1s
When deserialized, I get:
http://pastebin.com/YuF8nXHe
I also tested the XML with the w3c validator and the file is valid
http://www.w3schools.com/xml/xml_validator.asp
Best regards,
Andrei
File serialized by tinyxml
I have made a patch for this bug. should I post it here or send it to leethompason ?
Also, lee's email id given on the project page doesn't work anymore.
Never hurts to have it here as well. I would post it. When the author decides to include it, it will find it here. In the mean time, we could all benefit from it
Thank you for your efforts :)
From tinyxml.h:
So please read the documentation and consider using SetCondenseWhiteSpace to fix this "unexpected" behavior. Please close the issue unless the suggestion doesn't cover your use-case/behavior.