docs: public static List<Element> getChildElements(final Element elem, final boolean deep) {
          final NodeList children = deep ? elem.getElementsByTagName("*") : elem.getChildNodes();
          final List<Element> res = new ArrayList<>(children.getLength());
          for (int i = 0; i < children.getLength(); i++) {
              final Node child = children.item(i);
              if (child.getNodeType() == Node.ELEMENT_NODE) {
                  res.add((Element) child);
              }
          }
          return res;
      }