Decode XML Characters (numeric) in Strings
i want to decode the following string Photo's to Photo's. Is there a function in qt5.4?
what do you mean?
The two strings are the same.
Damn it. Seems the Forum converted it. I meant this: <pre><code>Photo & # 0 3 9 ; s</code></pre>
P.S. How is the syntax for code or raw text?
to read XML strings the suggested way is to use
P.S. To write raw text you can include it in `<TEXT>`;
Sorry, i inserted the tags pre and code. The Forum says it supports Markdown. Apparently not. I have only the string
Photo'sand want to "convert" it to Photo's.
If you aren't dealing with a complete XML document and don't want to use QXmlStreamReader and Writer you can just do
QString("My string with Photo's").replace("'", "'")to replace the entity with the actual character.