code: @Override
      public boolean hasNext() {
          boolean retVal = false;
  
          if (!mStack.empty() && (mCloseElements || mCloseElementsEmitted)) {
              /*
               * mAxis.hasNext() can't be used in this case, because it would
               * iterate to the next node but at first all end-tags have to be
               * emitted.
               */
              retVal = true;
          } else {
              retVal = mAxis.hasNext();
          }
  
          return retVal;
      }
docs: {@inheritDoc}