docs: protected final void readToEndElement(XMLEventReader eventReader, StartElement event)
              throws XMLStreamException {
          final Deque<QName> elementStack = new LinkedList<QName>();
          elementStack.push(event.getName());
  
          while (!elementStack.isEmpty()) {
              final XMLEvent nextEvent = eventReader.nextEvent();
              if (nextEvent.isStartElement()) {
                  final StartElement startElement = nextEvent.asStartElement();
                  elementStack.push(startElement.getName());
              } else if (nextEvent.isEndElement()) {
                  final QName lastStart = elementStack.pop();
                  final EndElement endElement = nextEvent.asEndElement();
                  if (!lastStart.equals(endElement.getName())) {
                      throw new XMLStreamException(
                              "Invalid XML Structure, expected EndElement "
                                      + lastStart
                                      + " but found EndElment "
                                      + endElement.getName());
                  }
              }
          }
      }