docs: protected void beforeEndElement() {
          final Set<StackState> state = scopeState.getFirst();
          // but not data
          if (depth > 0
                  && state.contains(StackState.WROTE_MARKUP)
                  && !state.contains(StackState.WROTE_DATA)) {
              final String indent = this.getIndent(depth - 1, indentSize);
              final Characters indentEvent = xmlEventFactory.createCharacters(indent);
              try {
                  wrappedWriter.add(indentEvent);
              } catch (XMLStreamException e) {
                  // Ignore exceptions caused by indentation
              }
          }
      }