Skip to content

Updating XML file

Aparna

Asked Jul 16, 2008, 8:23 PM EDT1 answer
Share
LinkedInX

I have an xml file say Example.xml which is like...



 


    indiansections
    India
    Steel
    RolledSteel
 

 
    indiansections
    India
    Steel
    RolledSteel
 

 
    indiansections
    India
    Steel
    RolledSteel
 

 
    indiansections
    India
    Steel
    RolledSteel
 

 
    indiansections
    India
    Steel
    RolledSteel
 

 
    indiansections
    India
    Steel
    RolledSteel
 

 
    indiansections
    India
    Steel
    RolledSteel
 

I have created the xml using XmlTextWriter in a button click event. Now what i want to do is add a complete block to this xml like


    americansections
    America
    Steel
    ColdFormedSteel
 

before the end tag of

Being new to c# i am a bit confused of how to do this. Any sort of help will be much appreciated...

Thanks in advance.

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Mahesh Chand
    0

    Here is a complete book on XML Programming in C#. Check the Update/Insert nodes section somewhere in it.

    XML Programming in C# and .NET

    Programming XML with C# is a 65 pages book written for C# programmers who wish to learn how to work with XML documents using C# language. ...
    0