code: @Override
      public XMLEvent nextEvent() throws XMLStreamException {
          try {
              if (!mCloseElements && !mCloseElementsEmitted) {
                  mKey = mAxis.next();
  
                  if (mNextTag) {
                      if (mAxis.getNode().getKind() != ELEMENT) {
                          throw new XMLStreamException("The next tag isn't a start- or end-tag!");
                      }
                      mNextTag = false;
                  }
              }
              emit();
          } catch (final TTIOException exc) {
              throw new XMLStreamException(exc);
          }
  
          return mEvent;
      }
docs: {@inheritDoc}