แก้ไข

แชร์ผ่าน


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:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<System::Xml::Linq::XNode ^> ^ DescendantNodesAndSelf(System::Collections::Generic::IEnumerable<System::Xml::Linq::XElement ^> ^ source);
public static System.Collections.Generic.IEnumerable<System.Xml.Linq.XNode> DescendantNodesAndSelf (this System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement> source);
public static System.Collections.Generic.IEnumerable<System.Xml.Linq.XNode> DescendantNodesAndSelf (this System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement?> source);
static member DescendantNodesAndSelf : seq<System.Xml.Linq.XElement> -> seq<System.Xml.Linq.XNode>
<Extension()>
Public Function DescendantNodesAndSelf (source As IEnumerable(Of XElement)) As IEnumerable(Of XNode)

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