#121 double spaces are replaced with single space

open
nobody
None
5
2011-08-10
2011-08-10
crtmpserver
No

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

Discussion

  • crtmpserver

    crtmpserver - 2011-08-10

    File serialized by tinyxml

     
  • zinga

    zinga - 2012-07-17

    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.

     
  • crtmpserver

    crtmpserver - 2012-07-17

    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 :)

     

Log in to post a comment.