+ 3
C# want change name in the second line how to change
<CStudent> <student> <name>boy</name> <age>10</age> <location>paris</location> <phone>222-555</phone> </student> <student> <name>mark</name> <age>18</age> <location>korea</location> <phone>01026800393</phone> </student> </CStudent> Code c# _myXML.SelectSingleNode("CStudent/student/name").InnerText = txtName.Text; _myXML.SelectSingleNode("CStudent/student/age").InnerText = txtAge.Text; _myXML.SelectSingleNode("CStudent/student/location").InnerText = txtLocation.Text; _myXML.SelectSingleNode("CStudent/student/phone").InnerText = txtPhone.Text;
4 ответов
+ 2
XmlDocument _myXML = new XmlDocument();
Yes Student Mark . How to change this Sir?
+ 2
Use SelectNodes
Place the nodes in a XMLNodeList
And use a foreach-loop to loop throught the node list
http://www.csharp-examples.net/xml-nodes-by-name/
+ 2
I will try sir
+ 1
What is the type of _myXML ?
What do you mean by second line ? The node of student Mark or something else ?