Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Decode XML Characters (numeric) in Strings

Decode XML Characters (numeric) in Strings

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 1.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Maptuzu
    wrote on last edited by
    #1

    Hello,

    i want to decode the following string Photo's to Photo's. Is there a function in qt5.4?

    Greets

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      Hi,

      what do you mean?
      The two strings are the same.

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Maptuzu
        wrote on last edited by Maptuzu
        #3

        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?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by
          #4

          Hi,

          to read XML strings the suggested way is to use QXmlStreamReader.

          P.S. To write raw text you can include it in `<TEXT>`; <pre><code>AAA &#309;s</code></pre>

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          M 1 Reply Last reply
          0
          • M mcosta

            Hi,

            to read XML strings the suggested way is to use QXmlStreamReader.

            P.S. To write raw text you can include it in `<TEXT>`; <pre><code>AAA &#309;s</code></pre>

            M Offline
            M Offline
            Maptuzu
            wrote on last edited by
            #5

            Sorry, i inserted the tags pre and code. The Forum says it supports Markdown. Apparently not. I have only the string Photo&#039;s and want to "convert" it to Photo's.

            1 Reply Last reply
            0
            • H Offline
              H Offline
              Huulivoide
              wrote on last edited by
              #6

              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&#039;s").replace("&#039", "'") to replace the entity with the actual character.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved