Click here to Skip to main content
15,665,875 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
hi guys,

i have a 2 node in my xml file like :




i want when i click on a radiolist on button "1" a child node will add in a 1 and if i click on radiolist button "2" a child node will add in a 2.

can i know how can i do this?

Edit: XML formatted
Updated 8-Sep-11 4:52am

Share this answer
Select the node with SelectSingleNode[^] depending on your radiobutton selection and add child node using AppendChild[^] method.
Share this answer
You can do this in JavaScript

xmlDoc=loadXMLDoc("XML1.xml");//loading XML

newel=xmlDoc.createElement("node");//creating new node name node

x=xmlDoc.getElementsByTagName("Root Node")[0];//Appending the node to first root element

to do this in C#

Check this[^]
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