nerdexam
Microsoft

70-516 · Question #11

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

Sign in or unlock 70-516 to reveal the answer and full explanation for question #11. 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 the following XML fragment: <ApplicationMenu> <MenuItem name="File"> <MenuItem name="New"> <MenuItem name="Project" /> <MenuItem name="Web Site" /> </MenuItem> <MenuItem name="Open"> <MenuItem name="Project" /> <MenuItem name="Web Site" /> </MenuItem> <MenuItem name="Save" /> </MenuItem> <MenuItem name="Edit"> <MenuItem name="Cut" /> <MenuItem name="Copy" /> <MenuItem name="Paste" /> </MenuItem> <MenuItem name="Help"> <MenuItem name="Help" /> <MenuItem name="About" /> </MenuItem> </ApplicationMenu> The application queries the XML fragment by using the XmlDocument class. You need to select all the descendant elements of the MenuItem element that has its name attribute as File. Which XPath expression should you use?

Options

  • A//*[@name='File'][name()='MenuItem']
  • B/ApplicationMenu/MenuItem['File']//MenuItem
  • C/ApplicationMenu/MenuItem/descendant::MenuItem['File']
  • D/ApplicationMenu/MenuItem[@name='File']/descendant::MenuItem

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