How to update XML file from vb.net code behind?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NawazAhmed
    New Member
    • Feb 2008
    • 36

    How to update XML file from vb.net code behind?

    I have an xml file like this:
    Code:
    <book></book>
    <author></author>
    <price></price>
    and I am trying to pass the values to the nodes book, author and price from code behind.
    I have 3 fields book, author and price on the design and user enters this information and when he clicks submit button I have to update this xml file.
    I don't know how to fill this nodes.
    Can someone help me out here with code and explanation if possible.

    Basically I am updating this XML File form code behind.


    Thanks.
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    Read this article. I think that it would be better for you to learn the basics of using/manipulating XML in C# rather than just explain this one case to you.

    EDIT:
    Sorry, didn't see that you were using VB.NET. Let me look for a different article.

    Comment

    • Curtis Rutland
      Recognized Expert Specialist
      • Apr 2008
      • 3264

      #3
      Here, try this article.

      But you should still learn the concepts.

      Comment

      • NawazAhmed
        New Member
        • Feb 2008
        • 36

        #4
        http://www.w3schools.c om/xml/tryit.asp?filen ame=tryxml_dom_ changeelement

        What do u say abt this example??

        Comment

        • NawazAhmed
          New Member
          • Feb 2008
          • 36

          #5
          I found this link:
          here u can find many ways to write, read an XML file from vb.net.

          http://www.vbdotnethea ven.com/UploadFile/mahesh/XMLusingVbDotNe t04222005015518 AM/XMLusingVbDotNe t.aspx

          Comment

          • Curtis Rutland
            Recognized Expert Specialist
            • Apr 2008
            • 3264

            #6
            Originally posted by NawazAhmed
            http://www.w3schools.c om/xml/tryit.asp?filen ame=tryxml_dom_ changeelement

            What do u say abt this example??
            This is javascript, not VB.NET.

            Comment

            Working...