Extensions.DescendantsAndSelf Extensions.DescendantsAndSelf Extensions.DescendantsAndSelf Method

Definition

Returns a collection of every element in the source collection, and all descendant elements for every element in the source collection.

Overloads

DescendantsAndSelf(IEnumerable<XElement>) DescendantsAndSelf(IEnumerable<XElement>) DescendantsAndSelf(IEnumerable<XElement>)

Returns a collection of elements that contains every element in the source collection, and the descendent elements of every element in the source collection.

DescendantsAndSelf(IEnumerable<XElement>, XName) DescendantsAndSelf(IEnumerable<XElement>, XName) DescendantsAndSelf(IEnumerable<XElement>, XName)

Returns a filtered collection of elements that contains every element in the source collection, and the descendents of every element in the source collection. Only elements that have a matching XName are included in the collection.

Remarks

Although Visual Basic has an integrated XML axis for descendant elements, there is no integrated axis that has the semantics of this method.

This method uses deferred execution.

DescendantsAndSelf(IEnumerable<XElement>) DescendantsAndSelf(IEnumerable<XElement>) DescendantsAndSelf(IEnumerable<XElement>)

Returns a collection of elements that contains every element in the source collection, and the descendent elements of every element in the source collection.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<System::Xml::Linq::XElement ^> ^ DescendantsAndSelf(System::Collections::Generic::IEnumerable<System::Xml::Linq::XElement ^> ^ source);
public static System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement> DescendantsAndSelf (this System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement> source);
<Extension()>
Public Function DescendantsAndSelf (source As IEnumerable(Of XElement)) As IEnumerable(Of XElement)
Parameters
source
IEnumerable<XElement>

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

Returns

An IEnumerable<T> of XElement that contains every element in the source collection, and the descendent elements of every element in the source collection.

Remarks

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

This method uses deferred execution.

See Also

DescendantsAndSelf(IEnumerable<XElement>, XName) DescendantsAndSelf(IEnumerable<XElement>, XName) DescendantsAndSelf(IEnumerable<XElement>, XName)

Returns a filtered collection of elements that contains every element in the source collection, and the descendents of every element in the source collection. Only elements that have a matching XName are included in the collection.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<System::Xml::Linq::XElement ^> ^ DescendantsAndSelf(System::Collections::Generic::IEnumerable<System::Xml::Linq::XElement ^> ^ source, System::Xml::Linq::XName ^ name);
public static System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement> DescendantsAndSelf (this System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement> source, System.Xml.Linq.XName name);
<Extension()>
Public Function DescendantsAndSelf (source As IEnumerable(Of XElement), name As XName) As IEnumerable(Of XElement)
Parameters
source
IEnumerable<XElement>

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

name
XName XName XName

The XName to match.

Returns

An IEnumerable<T> of XElement that contains every element in the source collection, and the descendents of every element in the source collection. Only elements that have a matching XName are included in the collection.

Remarks

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

This method uses deferred execution.

See Also

Applies to