code: public Iterator<Node> iterator() {
  
          return new Iterator<Node>() {
              private int currentIndex = 0;
              
              public boolean hasNext() {
                  return currentIndex < nodeList.getLength();
              }
              
              public Node next() {
                  Node next = nodeList.item(currentIndex);
                  currentIndex++;
                  if (next == null) {
                      throw new NoSuchElementException("No element found for index: " + currentIndex);
                  }
                  return next;
              }
              
              public void remove() {
                  throw new UnsupportedOperationException("IterableNodeList does not support remove");
              }
          };
      }
docs: Returns an iterator wrapping the underlying enumeration