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. C#
  4. Reading and Writing through XML File

Reading and Writing through XML File

Scheduled Pinned Locked Moved C#
helpxmlworkspace
1 Posts 1 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
    rahuladya
    wrote on last edited by
    #1

    hello froum I am writing the elements to xml file on runtime,and also using them. It is working properly.

    XmlDocument xmlDoc = new XmlDocument();
    string path = AppDomain.CurrentDomain.BaseDirectory.Substring(0, AppDomain.CurrentDomain.BaseDirectory.LastIndexOf("bin\\")) + @"\XMLFind.xml";
    xmlDoc.Load(path);
    XmlNodeList xmlNS = xmlDoc.GetElementsByTagName("testword");

    The xml file is in the bin folder. but the problem is after creating setup the xml file is seen to every body so it can be deleted accidently. If the xml file is placed in the project then it gives the runtime error

    Could not fine the C:\Program Files\hts\SetupFinal\XMLFind.xml.

    can anybody help me... Regards Rahul Adya

    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