Which method will return all nodes of an XDocument?

Which method will return all nodes of an XDocument?

Which method will return all nodes of an XDocument?

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 0

Your email address will not be published. Required fields are marked *