String (@NotNull PsiElement element) { if (element instanceof XmlTag) { return ((XmlTag)element).getName(); } if (element instanceof XmlAttributeValue) { return ((XmlAttributeValue)element).getValue(); } if (element instanceof PsiNamedElement) { return ((PsiNamedElement)element).getName(); } return element.getText(); }