"character entities" and streams

  • Leonardo Francalanci

    Why aren't "character entities"  correctly encoded when using C++ streams?
    That is: having a `<Hello>` tag containing the string "Worl>d", I get:

    `<Hello>Worl>d</Hello>` using C++ streams (invalid xml!), but:

    `<Hello>Worl>d</Hello>` using FILE* (valid xml!)

  • Leonardo Francalanci

    The forum formats my "code" in the wrong way… basically what I don't understand is why a character entity  (say '&') is not properly encoded when using C++ streams, while it's encoded properly when using the FILE* interface. This makes the streaming interface useless because it doesn't output a valid xml!

  • lak

    lak - 2011-12-02

    has this issue been resolved in 2.6.+ version.
    we are facing similar problem, but strangely only with < (less than) and & (ampersand)


Log in to post a comment.