XmlTag (final String name, final String text) { final XmlFile file = (XmlFile)PsiFileFactory.getInstance(getProject()) .createFileFromText(name, XmlFileType.INSTANCE, text, LocalTimeCounter.currentTime(), true); return file.getDocument().getRootTag(); }