Click here to Skip to main content
15,892,674 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 :
HTML
<1>

</1>



<2>

</2>


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
Posted
Updated 8-Sep-11 4:52am
v4

 
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

C#
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
x.appendChild(newel);


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