private static void getAllElements(Element root, List<? super Element> list, List<String> toCheck) {
    if (toCheck.contains(StringUtil.toLowerCase(root.getName()))) {
      list.add(root);
    }
    for (int i = 0; i < root.getElementCount(); i++) {
      getAllElements(root.getElement(i), list, toCheck);
    }
  }
private static void getAllElements(Element root, List<? super Element> list, List<String> toCheck)