Click here to Skip to main content
15,900,589 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do i insert an sub xml node dynamically in a xml file using c#?

What I have tried:

I have located the node to insert,
this is the below code:
xnlNodes = xelRoot.SelectNodes("/batchAnswer/document/answers")[docIndex].ChildNodes;

but want to know to insert the sub XML node?
Updated 11-Oct-16 23:10pm

1 solution

Try to use XmlNode.AppendChild-Methode, is very good documented!
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900