nerdexam
Microsoft

70-516 · Question #62

70-516 Question #62: Real Exam Question with Answer & Explanation

Sign in or unlock 70-516 to reveal the answer and full explanation for question #62. The question stem and answer options stay visible for context.

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application contains following XML document. <feed> <title>Products</title> <entry> <title>Entry title 1</title> <author>Author 1</author> <content> <properties> <description>some description</description> <notes>some notes</notes> <comments>some comments</comments> </properties> </content> </entry> ... </feed> You plan to add localization features to the application. You add the following code segment. (Line numbers are included for reference only.) 01 public IEnumerable <XNode> GetTextNodesForLocalization(XDocument doc) 02 { 03 ... 04 return from n in nodes 05 where n.NodeType = XmlNodeType.Text 06 select n; 07 } You need to ensure that the GetTextNodeForLocalization method returns all the XML text nodes of the XML document. Which code segment should you inser at line 03?

Options

  • AIEnumerable <XNode> nodes = doc.Descendants();
  • BIEnumerable <XNode> nodes = doc.Nodes();
  • CIEnumerable <XNode> nodes = doc.DescendantNodes();
  • DIEnumerable <XNode> nodes = doc.NodesAfterSelf();

Unlock 70-516 to see the answer

You've previewed enough free 70-516 questions. Unlock 70-516 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 70-516 Practice