void (@NotNull DomElement element, @NotNull Consumer<? super @NotNull DomElement> visitor) { final XmlElement xmlElement = element.getXmlElement(); if (xmlElement instanceof XmlTag) { for (final DomElement child : DomUtil.getDefinedChildren(element, true, true)) { final XmlElement element1 = child.getXmlElement(); if (element1 == null) { LOG.error("child=" + child + " of class " + child.getClass() + "; parent=" + element); } else if (element1.isPhysical()) { visitor.accept(child); } } for (final AbstractDomChildrenDescription description : element.getGenericInfo().getChildrenDescriptions()) { if (description.getAnnotation(Required.class) != null) { for (final DomElement child : description.getValues(element)) { if (!DomUtil.hasXml(child)) { visitor.accept(child); } } } } } }