nerdexam
Microsoft

70-516 · Question #107

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application. A file named books.xml contains the following XML. <bib> <book title="Programming in Unix" year="1992">…

The correct answer is A. XDocument document = XDocument.Load("books.xml"). See the full explanation below for the reasoning.

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application. A file named books.xml contains the following XML. <bib> <book title="Programming in Unix" year="1992"> <author>Author1</author> <author>Author2</author> <author> Author 3 </author> </book> </bib> The application must generate an XML result that contains an XML element named BookTitle for each book. The text content of the element must contain the title of the book. You need to create a query that generates the new XML result. What should you do?

Options

  • AXDocument document = XDocument.Load("books.xml");
  • BXDocument document = XDocument.Load("books.xml");
  • CXDocument document = XDocument.Load("books.xml");
  • DXDocument document = XDocument.Load("books.xml");

How the community answered

(21 responses)
  • A
    71% (15)
  • B
    19% (4)
  • C
    5% (1)
  • D
    5% (1)

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice