Code example for NoSuchElementException

0
  } 
 
  @Override 
  public SimpleXmlNode next() { 
    if (!hasNext()) { 
      throw new NoSuchElementException();
    } 
 
    Iterator<SimpleXmlNode> top = _iterators.peek();
    SimpleXmlNode result = top.next();
    if (!result.getChildren().isEmpty()) {
      _iterators.push(result.getChildren().iterator());
    } 
 
    return result;
  } 
 
  @Override 
  public void remove() { 
    throw new UnsupportedOperationException();
  }