How to edit and delete the data stored in xml file using C# and visual studio 2005

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fishjelly
    New Member
    • Jun 2008
    • 5

    #1

    How to edit and delete the data stored in xml file using C# and visual studio 2005

    How to edit and delete the data stored in xml file using C# and visual studio 2005 through user input?

    For example:
    for this xml document...

    <MenuRoot>
    <Books>
    <book>
    <title> ABC </title>
    <author>DEF</author>
    <subject>Projec t Management </subject>
    </book>
    </Books>
    </MenuRoot>

    Edit the existing data to become as follow (edit the author part)

    <MenuRoot>
    <Books>
    <book>
    <title> ABC </title>
    <author>Peter </author>
    <subject>Projec t Management </subject>
    </book>
    </Books>
    </MenuRoot>

    And I also would like to know how to delete the book info ( or the delete the entire book element) stored inside the file. Thanks!!!
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Read about how to use the XMLReader class.

    Comment

    Working...