public static String getAttributeName(XmlAttribute attribute) { if (attribute != null) { for (PsiElement child : attribute.getChildren()) { if (XmlHelper.isAttributeName(child)) { return child.getText(); } } } return null; }