Your Web site processes book orders. One of the application methods contains the following code segment.XmlDocument doc = newXmlDocument();doc.LoadXml(“<book><discount>10</discount>”+”<title>Dictionary</title></book>”);You need to remove the discount element from XmlDocument. Which two code segments can you use to achieve this goal?

 Posted by Charugoel on 2/4/2009 | Category: .NET Framework Interview questions | Views: 8289
Select from following answers:
  1. XmlNode root = doc.DocumentElement;root.RemoveChild(root.FirstChild);
  2. XmlNode root = dec.DocumentElement;root.RemoveChild(root.SelectSingleNode(“discount”));
  3. doc.RemoveChild(doc.FirstChild);
  4. doc.DocumentElement.RemoveChild(doc.FirstChild);
  5. All Above

Show Correct Answer

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response