code: public static ArrayList<Element> getChildElements(Node node) {
          ArrayList<Element> childElements = new ArrayList<>();
          NodeList childNodes = node.getChildNodes();
          for (int i = 0; i < childNodes.getLength(); i++) {
              if (childNodes.item(i) instanceof Element) {
                  childElements.add((Element) childNodes.item(i));
              }
          }
          return childElements;
      }
docs: Only return child nodes that are elements - text nodes are ignored.
  
  @param node We will take the children from this node.
  @return New ordered list of child elements.