System.Xml.Linq.Extensions
Contains the LINQ to XML extension methods.
Returns a collection of elements that contains the ancestors of every node in the source collection.
public static IEnumerable<XElement> Ancestors<T>(this IEnumerable<T> source, XName name) where T : XNode
Returns a filtered collection of elements that contains the ancestors of every node in the source collection. Only elements that have a matching XName are included in the collection.
Returns a collection of elements that contains every element in the source collection, and the ancestors of every element in the source collection.
Returns a filtered collection of elements that contains every element in the source collection, and the ancestors of every element in the source collection. Only elements that have a matching XName are included in the collection.
Returns a collection of the attributes of every element in the source collection.
Returns a filtered collection of the attributes of every element in the source collection. Only elements that have a matching XName are included in the collection.
public static IEnumerable<XNode> DescendantNodes<T>(this IEnumerable<T> source) where T : XContainer
Returns a collection of the descendant nodes of every document and element in the source collection.
Returns a collection of nodes that contains every element in the source collection, and the descendant nodes of every element in the source collection.
Returns a collection of elements that contains the descendant elements of every element and document in the source collection.
public static IEnumerable<XElement> Descendants<T>(this IEnumerable<T> source, XName name) where T : XContainer
Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. Only elements that have a matching XName are included in the collection.
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 static IEnumerable<XElement> DescendantsAndSelf(this IEnumerable<XElement> source, XName name)
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.
Returns a collection of the child elements of every element and document in the source collection.
public static IEnumerable<XElement> Elements<T>(this IEnumerable<T> source, XName name) where T : XContainer
Returns a filtered collection of the child elements of every element and document in the source collection. Only elements that have a matching XName are included in the collection.
Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.
Returns a collection of the child nodes of every document and element in the source collection.
Removes every attribute in the source collection from its parent element.
Removes every node in the source collection from its parent node.