public static IEnumerable <IXmlElementSyntax> Ancestors(this SyntaxNode node) { return(node.AncestorNodes().Where(n => n.IsElement()).Cast <IXmlElementSyntax>()); }