6
Answers

insert into existing xml using c#

agile

agile

10y
15.3k
1
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)