List<String> (@Nullable Element element, String path, String childrenName) { List<String> result = new ArrayList<>(); for (Element each : findChildrenByPath(element, path, childrenName)) { String value = each.getTextTrim(); if (!value.isEmpty()) { result.add(value); } } return result; }