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

MSXML

Scheduled Pinned Locked Moved XML / XSL
questionsysadminxml
5 Posts 2 Posters 0 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.
  • A Offline
    A Offline
    Andy H
    wrote on last edited by
    #1

    I am using MSXML and prior to sending a XML (IXMLDOMDocument2*) through to a server, I need to strip out the CR's and LF's or just the CR's (0x09) from the XML file to send. How can I do this please?

    L 1 Reply Last reply
    0
    • A Andy H

      I am using MSXML and prior to sending a XML (IXMLDOMDocument2*) through to a server, I need to strip out the CR's and LF's or just the CR's (0x09) from the XML file to send. How can I do this please?

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      did you try doc->preserveWhiteSpace(VARIANT_FALSE) ?

      led mike

      A 1 Reply Last reply
      0
      • L led mike

        did you try doc->preserveWhiteSpace(VARIANT_FALSE) ?

        led mike

        A Offline
        A Offline
        Andy H
        wrote on last edited by
        #3

        Yes. But that still leaves the CR's i.e. 0x0d! The document being loaded from disk has been canonalised ( C14N ) and doesn't have the CR's but as soon as it is loaded into my IXMLDomDocument2 object they are back. I have the following settings set: put_async( VARIANT_FALSE ) put_validateOnParse(VARIANT_TRUE) put_resolveExternals(VARIANT_FALSE) put_preserveWhiteSpace(VARIANT_TRUE) I would appreciate anyones advise on this.

        L 1 Reply Last reply
        0
        • A Andy H

          Yes. But that still leaves the CR's i.e. 0x0d! The document being loaded from disk has been canonalised ( C14N ) and doesn't have the CR's but as soon as it is loaded into my IXMLDomDocument2 object they are back. I have the following settings set: put_async( VARIANT_FALSE ) put_validateOnParse(VARIANT_TRUE) put_resolveExternals(VARIANT_FALSE) put_preserveWhiteSpace(VARIANT_TRUE) I would appreciate anyones advise on this.

          L Offline
          L Offline
          led mike
          wrote on last edited by
          #4

          Andy H wrote:

          put_preserveWhiteSpace(VARIANT_TRUE)

          :omg::wtf: VARIANT_TRUE != VARIANT_FALSE :(:sigh::doh:

          led mike

          A 1 Reply Last reply
          0
          • L led mike

            Andy H wrote:

            put_preserveWhiteSpace(VARIANT_TRUE)

            :omg::wtf: VARIANT_TRUE != VARIANT_FALSE :(:sigh::doh:

            led mike

            A Offline
            A Offline
            Andy H
            wrote on last edited by
            #5

            What I meant that I had tried set preserveWhiteSpace to VARIANT_TRUE. This does indeed get rid of the WhiteSpace but I still have CR-LF's i.e. I have: 0D 0A 09 09 Because the xml file saved to disk has been C14N'ed then when loaded into my IXMLDOMDocument2 object for transmission the signle LF's i.e. 0A have been converted back into CR-LF's i.e. OD OA pairs. What I want to know is how can I load the XML file into my IXMLDOMDocument2 object without it changing it in any way?

            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