boolean (String prefix, Project project) { try { XmlTag tag = XmlElementFactory.getInstance(project).createTagFromText("<" + prefix + ":foo/>"); return "foo".equals(tag.getLocalName()); } catch (IncorrectOperationException e) { return false; } }