XmlTag (@NotNull XmlTag place, @NotNull XmlAttributeValue id) { XmlTag tag = createElementFromText(place.getProject(), place, "<label for=\"x\"></label>"); //noinspection ConstantConditions tag.getAttribute("for").getValueElement().replace(id); return tag; }