Microsoft
70-516 · Question #278
70-516 Question #278: Real Exam Question with Answer & Explanation
Sign in or unlock 70-516 to reveal the answer and full explanation for question #278. The question stem and answer options stay visible for context.
Question
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application contains the following XML document. < feed > < title > Products < /title > < entry > < title > Entry title 1 < /title > < author > Author1 < /title > < content > < properties > < description > some description < /description > < n otes > 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.) 01Public Function GetTextNodesForLocalization(doc As XDocument) As IEnumerable(Of XNode) 03Return From n In nodes _ 04Where n.NodeType = XmlNodeType.Text _ 05 Select n 06End Function You need to ensure that the GetTextNodesForLocalization method returns all the XML text nodes of the document. Which code segment should you insert at line 02?
Options
- ADim nodes As IEnumerable(Of XNode) = doc.Descendants()
- BDim nodes As IEnumerable(Of XNode) = doc.Nodes()
- CDim nodes As IEnumerable(Of XNode) = doc.DescendantNodes()
- DDim nodes As IEnumerable(Of XNode) = 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.