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. C# Append XML File

C# Append XML File

Scheduled Pinned Locked Moved XML / XSL
csharpsalesxmlarchitecturequestion
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.
  • W Offline
    W Offline
    Wheels012
    wrote on last edited by
    #1

    Good morning. I have the following simple XML file.

    <?xml version="1.0" standalone="yes"?>
    <SHRPT_SITE>
    <RECORD>
    <Name>Apps (doc)</Name>
    <Address>http://unumtfsprod/sites/IServices/Apps/Forms/AllItems.aspx</Address>
    </RECORD>
    <RECORD>
    <Name>Internet Services Architecture (arch)</Name>
    <Address>http://teamspace/sites/iservices/architecture/default.aspx</Address>
    </RECORD>
    <RECORD>
    <Name>iServices Customer Self Service (staff)</Name>
    <Address>http://teamspace/sites/isgcrm/custselfsvc/default.aspx</Address>
    </RECORD>
    </SHRPT_SITE>

    I want the user to be able to click a (favorites) button and be able to add a site name and URL to the file. What would be the best code approach to accomplish this? Thank you, WHEELS

    C 1 Reply Last reply
    0
    • W Wheels012

      Good morning. I have the following simple XML file.

      <?xml version="1.0" standalone="yes"?>
      <SHRPT_SITE>
      <RECORD>
      <Name>Apps (doc)</Name>
      <Address>http://unumtfsprod/sites/IServices/Apps/Forms/AllItems.aspx</Address>
      </RECORD>
      <RECORD>
      <Name>Internet Services Architecture (arch)</Name>
      <Address>http://teamspace/sites/iservices/architecture/default.aspx</Address>
      </RECORD>
      <RECORD>
      <Name>iServices Customer Self Service (staff)</Name>
      <Address>http://teamspace/sites/isgcrm/custselfsvc/default.aspx</Address>
      </RECORD>
      </SHRPT_SITE>

      I want the user to be able to click a (favorites) button and be able to add a site name and URL to the file. What would be the best code approach to accomplish this? Thank you, WHEELS

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Use an XmlDocument to create a new record, and then append it to the shrpt_site node.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      W 1 Reply Last reply
      0
      • C Christian Graus

        Use an XmlDocument to create a new record, and then append it to the shrpt_site node.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        W Offline
        W Offline
        Wheels012
        wrote on last edited by
        #3

        Thank you Christian.

        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