DomElement[] (@NotNull final DomElement domElement) { final List<DomElement> children = new ArrayList<>(); domElement.acceptChildren(new DomElementVisitor() { @Override public void visitDomElement(final DomElement element) { children.add(element); } }); return children.toArray(DomElement.EMPTY_ARRAY); }