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&gt;d</Hello>` using FILE* (valid xml!)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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&gt;d</Hello>` using FILE* (valid xml!)
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!
has this issue been resolved in 2.6.+ version.
we are facing similar problem, but strangely only with < (less than) and & (ampersand)