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.Descendants();

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.

2 Comments on “Which method will return all nodes of an XDocument?


Leave a Reply