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. xml

xml

Scheduled Pinned Locked Moved XML / XSL
xml
4 Posts 4 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.
  • R Offline
    R Offline
    rkhokale
    wrote on last edited by
    #1

    How insert data in old xml file. I want old data in xml as it is when i insert new next time in same xml

    V D S 3 Replies Last reply
    0
    • R rkhokale

      How insert data in old xml file. I want old data in xml as it is when i insert new next time in same xml

      V Offline
      V Offline
      Vitaliy Tsvayer
      wrote on last edited by
      #2

      You could load data from xml file into XmlDocument, then add new xml data and save to the same file again. Something like this:

      XmlDocument doc = new XmlDocument();
      doc.Load("file_path.xml");

      //add new data
      XmlElement element = doc.CreateElement("NewElement");
      element.InnerText = "test data";
      doc.DocumentElement.AppendChild(element);

      doc.Save("file_path.xml");

      Vitaliy Tsvayer Tikle

      1 Reply Last reply
      0
      • R rkhokale

        How insert data in old xml file. I want old data in xml as it is when i insert new next time in same xml

        D Offline
        D Offline
        Dustin Metzgar
        wrote on last edited by
        #3

        I've seen this question enough times that I wrote an article on it: Link[^]


        Logifusion[^] If not entertaining, write your Congressman.

        1 Reply Last reply
        0
        • R rkhokale

          How insert data in old xml file. I want old data in xml as it is when i insert new next time in same xml

          S Offline
          S Offline
          Sage
          wrote on last edited by
          #4

          um, what ?

          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