public static IEnumerable <AspxNode> ElementsAndSelf(this AspxNode item) { yield return(item); foreach (var child in item.Elements()) { yield return(child); } }
public static IEnumerable <T> Elements <T>(this AspxNode item) { return(item.Elements().Where(i => i is T).Cast <T>()); }