Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. MSXML and CString !!!

MSXML and CString !!!

Scheduled Pinned Locked Moved XML / XSL
questionxml
5 Posts 3 Posters 2 Views 1 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.
  • D Offline
    D Offline
    Daniel Strigl
    wrote on last edited by
    #1

    I have a question about the MSXML parser ... I want to save a CString in an XML file with the MSXML parser ... So when the MSXML parser writes the string to the file does it check the string and convert some characters like "<, >, &, ..." to someone what is allowed for XML (< > ...) ??? Daniel ;) --------------------------- Never change a running system!

    D R 2 Replies Last reply
    0
    • D Daniel Strigl

      I have a question about the MSXML parser ... I want to save a CString in an XML file with the MSXML parser ... So when the MSXML parser writes the string to the file does it check the string and convert some characters like "<, >, &, ..." to someone what is allowed for XML (< > ...) ??? Daniel ;) --------------------------- Never change a running system!

      D Offline
      D Offline
      Daniel Turini
      wrote on last edited by
      #2

      You could write it to a CDATA section to create a node that accepts any kind of char, so you don't need to convert any char. It's as easy as: xmlDoc->createCDATASection("This is where the string goes"); I see dumb people

      D 1 Reply Last reply
      0
      • D Daniel Turini

        You could write it to a CDATA section to create a node that accepts any kind of char, so you don't need to convert any char. It's as easy as: xmlDoc->createCDATASection("This is where the string goes"); I see dumb people

        D Offline
        D Offline
        Daniel Strigl
        wrote on last edited by
        #3

        And what when I want to write the string to a attribut, like <ITEM description="Here is the string ... < > ...">? Daniel ;) --------------------------- Never change a running system!

        1 Reply Last reply
        0
        • D Daniel Strigl

          I have a question about the MSXML parser ... I want to save a CString in an XML file with the MSXML parser ... So when the MSXML parser writes the string to the file does it check the string and convert some characters like "<, >, &, ..." to someone what is allowed for XML (< > ...) ??? Daniel ;) --------------------------- Never change a running system!

          R Offline
          R Offline
          Retsof Nawor
          wrote on last edited by
          #4

          The MSXML DOM does the conversion for you & to & etc so you need not worry about it. However when you get a value out of the DOM it will not appear converted ie you will still retrieve &, the converted versions are there when the document is written to file or the XML retrieved with getXML etc

          D 1 Reply Last reply
          0
          • R Retsof Nawor

            The MSXML DOM does the conversion for you & to & etc so you need not worry about it. However when you get a value out of the DOM it will not appear converted ie you will still retrieve &, the converted versions are there when the document is written to file or the XML retrieved with getXML etc

            D Offline
            D Offline
            Daniel Strigl
            wrote on last edited by
            #5

            Thanks! Daniel ;) --------------------------- Never change a running system!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups