Raja

Raja

  • 548
  • 2k
  • 346.3k

How to add XML node using C#?

Aug 20 2016 2:04 AM
i generate dataset to xml using GetXml() function.<br /> <br /> string xml = DS_Test.GetXml();<br /> <br /> Now i use <br /> <br /> xml=xml.replace("&lt;<strong>&amp;ltnode&gt;</strong>" , "");<br /> <br /> above code to use replace the node empty.<br /> <br /> This xml have above 2500 lines. now i want to add one node in first and last how to add.means add the node to start of the xml and the node end of the xml.how to do this.<br /> <br /> <strong>What I have tried:</strong><br /> <br /> i use replace method to replace the xml node how to add the new xml parent node.

Answers (2)