public static string GetXPath(this XAttribute attribute) { var kvParent = attribute.Parent.GetBestKeyValueInfo(); var res = attribute.Parent.GetXPath(kvParent) + "/" + attribute.FQN(); return(res); }