Results 1 to 2 of 2

Thread: XML with c#

  1. #1
    Join Date
    Nov 2013
    Posts
    8

    XML with c#

    Hello i want to thank for the help.
    I have an xml file i read it and put new elements and attribute in space under the location

    Code:
    <record>
    <name>dsadasasds</name>
    <date>11/17/2013 9:02:39 PM</date>
    <site_songitude>1</site_songitude>
    <site_latitude>3</site_latitude>
    <location name_loc="dasdassa"/> 
      'heare i have to insert the new elements and attributes'
    </record>
    i write this code but it isnt make anything
    Code:
     XDocument doc = XDocument.Load(path);
                XElement root = new XElement("quadrat");
                root.Add(new XElement("sea_state", txtsea.Text));
                doc.Element("transect").Add(root);
                doc.Save(path);

  2. #2
    Join Date
    Dec 2007
    Posts
    1,736

    Re: XML with c#

    Follow the below link for detailed information on "How to read XML from a file by using Visual C#":

    http://support.microsoft.com/kb/307548

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,033,919.94967 seconds with 17 queries