agile

agile

  • NA
  • 1
  • 17.8k

insert into existing xml using c#

Feb 8 2011 1:39 PM
hi

i am new to c# and xml. i have a xml file named names.xml  like this

<names>
              <students>

                                 <student>A</student>
                                <student>B</student>
             </students>

            <teachers>

                                 <teacher>X</teacher >
                                < teacher >Y</teacher >
             </teachers>
</names>


now i want to insert D into student tag. when i insert it will insert outside of students.
how can i insert D into students using c#. any idea or help  please...

Answers (6)