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. Writing and saving a XML file?

Writing and saving a XML file?

Scheduled Pinned Locked Moved Visual Basic
questionxmlhelptutorial
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.
  • S Offline
    S Offline
    sanyexian
    wrote on last edited by
    #1

    Hello,everyone! I have a question about operating XML file. I need to open a XML file which was a template when the application run, after I've input in TextboxA, the XML file could be saved as a new file in one folder. Then open the saved file again and other Textboxes' text will be written in its elements. (In text_changed event). My question is : I know how to open and save a XML file, but after I save it ,if I want to write new text in it , I need to load the file again? When I write all text in XML, it would need open--write--save and repeat much times ?I think it is so fool…… So,could you give me some suggestions or help? Maybe I should use thread? But there are so much controls :sigh: Thanks !

    D 1 Reply Last reply
    0
    • S sanyexian

      Hello,everyone! I have a question about operating XML file. I need to open a XML file which was a template when the application run, after I've input in TextboxA, the XML file could be saved as a new file in one folder. Then open the saved file again and other Textboxes' text will be written in its elements. (In text_changed event). My question is : I know how to open and save a XML file, but after I save it ,if I want to write new text in it , I need to load the file again? When I write all text in XML, it would need open--write--save and repeat much times ?I think it is so fool…… So,could you give me some suggestions or help? Maybe I should use thread? But there are so much controls :sigh: Thanks !

      D Offline
      D Offline
      DaveAuld
      wrote on last edited by
      #2

      No once you open the XML file original, load it into an in memory object, make all the changes, and write out to file, keep making more changes to the internal memory object, and write out the changes when you want to persist to file.

      Dave Find Me On: Web|Facebook|Twitter|LinkedIn CPRepWatcher now available as Packaged Chrome Extension, visit my articles for link.

      S 1 Reply Last reply
      0
      • D DaveAuld

        No once you open the XML file original, load it into an in memory object, make all the changes, and write out to file, keep making more changes to the internal memory object, and write out the changes when you want to persist to file.

        Dave Find Me On: Web|Facebook|Twitter|LinkedIn CPRepWatcher now available as Packaged Chrome Extension, visit my articles for link.

        S Offline
        S Offline
        sanyexian
        wrote on last edited by
        #3

        Hi, Dave! Thanks for you rely. But I didn't get it……Could you take an example for me? Thanks a lot!

        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