Extensions.DescendantNodesAndSelf(IEnumerable<XElement>) Method

Definition

Returns a collection of nodes that contains every element in the source collection, and the descendant nodes of every element in the source collection.

public static System.Collections.Generic.IEnumerable<System.Xml.Linq.XNode> DescendantNodesAndSelf (this System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement> source);
Parameters
source
IEnumerable<XElement>

An IEnumerable<T> of XElement that contains the source collection.

Returns

An IEnumerable<T> of XNode that contains every element in the source collection, and the descendant nodes of every element in the source collection.

Remarks

Although Visual Basic has an integrated XML axis for descendant elements, there is no integrated axis for descendant nodes, so Visual Basic users must use this axis method explicitly.

This method uses deferred execution.

Applies to

See Also