Coding for Manipulate XML File Data Using C#?



Coding for Manipulate XML File Data Using C#?..

Answer / mahmoud kotb

XmlDocument doc = new XmlDocument();
doc.Load((@"c:/newfile.xml");
XmlNode xnode = doc.SelectSingleNode("//Settings/Bar");
//read the value of “Dheeraj”)
String Str = xnode.Innerxml;
//TO Update the value of “Dheeraj” to “Kumar”
Xnode.innerxml = “kumar”;
//TO delete the value of “Dheeraj” (all nodes of add tag)
Xnode.removeall();
doc.save((@"c:/newfile.xml");

Is This Answer Correct ?    3 Yes 3 No

Post New Answer

More C Sharp Code Interview Questions

. Write a program to print the following outputs using for loops $ $ $ $ $ $ $ $ $ $ $ $ $ $ $

3 Answers  


How to export 2 datatables of a single dataset to 2 different worksheets of a single MSExcel file ?

0 Answers   Eastcom Systems,


How to Link Different Data Sources Together?

0 Answers  


write a Program to copy the string using switch case.

0 Answers   Mind Tree, Wipro,


Write a program to count the number of characters, number of words, number of line in file.

2 Answers   Mind Tree,






Write a program which has a function and that function should take 2 or 3 or any number of strings and it should return the largest common prefix of all those strings. If there is no common prefix it should return an empty string. for eg:- INPUT OUTPUT glo {glory,glorious,glod} gl {glad,glow} {calendar,phone} empty string

2 Answers   Mind Tree,


Write a program to convert postfix expression to infix expression.

0 Answers   Mind Tree,


program to check if a number is "perfect number".

1 Answers   Mind Tree, SoftSol,


Can you declare an array of mixed Types?

1 Answers   HCL,


Event Handling in C# Triggering a Button

1 Answers  


Coding for using Nullable Types in C#?

1 Answers  


program to reverse the order of words in a string.

2 Answers   Mind Tree,


Categories
  • ASP.NET Code Interview Questions ASP.NET Code (46)
  • VB.NET Code Interview Questions VB.NET Code (9)
  • C Sharp Code Interview Questions C Sharp Code (51)
  • ADO.NET Code Interview Questions ADO.NET Code (8)