List<PsiElement> (@NotNull PsiElement xmlDocument) { List<PsiElement> children = new ArrayList<>(); PsiElement child = xmlDocument.getFirstChild(); while (child != null) { if (!myBuilder.isOuterLanguageElement(child)) { children.add(child); } child = child.getNextSibling(); } return children; }