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. Visual Basic
  4. issue in saving an xml

issue in saving an xml

Scheduled Pinned Locked Moved Visual Basic
helpcomsysadminxml
3 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
    ArchaBhandare
    wrote on last edited by
    #1

    I had written about this earlier, but the application does not work.. I have the server return in its response, an url to an xml file, say urlPath = "http://abc.xyz.com/tmp/ordera5fgscfs122dfbvgefsdsd.xml" I want that when the client receives the url to an xml string in the response it saves the xml file to a particular location specified earlier; say folderPath = "C:\" I am using the following code: Dim xmlDocToSave As MSXML2.DOMDocument40 xmlDocToSave.loadXML (urlPath) xmlDocToSave.save (folderPath) But this is not saving the xml file into the folder location. Can anyone please help, I want to know how should I save the xml file sent by the server. It is urgent

    D 1 Reply Last reply
    0
    • A ArchaBhandare

      I had written about this earlier, but the application does not work.. I have the server return in its response, an url to an xml file, say urlPath = "http://abc.xyz.com/tmp/ordera5fgscfs122dfbvgefsdsd.xml" I want that when the client receives the url to an xml string in the response it saves the xml file to a particular location specified earlier; say folderPath = "C:\" I am using the following code: Dim xmlDocToSave As MSXML2.DOMDocument40 xmlDocToSave.loadXML (urlPath) xmlDocToSave.save (folderPath) But this is not saving the xml file into the folder location. Can anyone please help, I want to know how should I save the xml file sent by the server. It is urgent

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      It's a bit difficult to follow your explanation. Is this server-side code and you're trying to save a file on the client machine? If so, then you can't do what you want. You have no control over where a client browser saves a file. You have to send the file in the Response stream with the proper encoding, then the browser will ask the user where he/she wants to save the file, just like if you were to download a .ZIP file.

      Dave Kreskowiak Microsoft MVP - Visual Basic

      A 1 Reply Last reply
      0
      • D Dave Kreskowiak

        It's a bit difficult to follow your explanation. Is this server-side code and you're trying to save a file on the client machine? If so, then you can't do what you want. You have no control over where a client browser saves a file. You have to send the file in the Response stream with the proper encoding, then the browser will ask the user where he/she wants to save the file, just like if you were to download a .ZIP file.

        Dave Kreskowiak Microsoft MVP - Visual Basic

        A Offline
        A Offline
        ArchaBhandare
        wrote on last edited by
        #3

        Thanx for your reply. I got it working. This is a client side implementation. The client receives an url to an xml file in the response and wants to save the xml file. The changes I had to go were as follows Say for instance, the server return in its response, an url to an xml file, urlPath = "http://abc.xyz.com/tmp/ordera5fgscfs122dfbvgefsdsd.xml" I want that when the client receives the url to an xml string in the response it saves the xml file as follows, filePath = "C:\saved.xml" Now I am using the following code: Dim xmlDocToSave As New DOMDocument40 xmlDocToSave.Load (urlPath) xmlDocToSave.save (filePath) This will save the contents of the xml in 'saved.xml' in C:\

        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