public static boolean isWhiteSpace(PsiElement element) {
    return element instanceof PsiWhiteSpace ||
           element instanceof XmlText &&
           element.getFirstChild() == element.getLastChild() &&
           element.getFirstChild() instanceof PsiWhiteSpace;
  }
public static boolean isWhiteSpace(PsiElement element)