PrepAway - Latest Free Exam Questions & Answers

Which method will return all nodes of an XDocument?

Which method will return all nodes of an XDocument?

PrepAway - Latest Free Exam Questions & Answers

A.
doc.DescendantNodes();

B.
doc.Descendant();

C.
doc.Root.Allnodes();

D.
doc.GetAllnodes();

Explanation:
public IEnumerable<XNode> DescendantNodes() Returns a collection of the descendant nodes for
this document or element, in document order.
public IEnumerable<XElement> Descendants() Returns a collection of the descendant elements for
this document or element, in document order.


Leave a Reply