/** Note that an element was started. */ protected void afterStartElement() { afterMarkup(); ++depth; scopeState.push(EnumSet.noneOf(StackState.class)); }
/** Note that an element was started. */ protected void afterStartElement() { afterMarkup(); ++depth; scopeState.push(EnumSet.noneOf(StackState.class)); }
/** Prepare to write markup, by writing a new line and indentation. */ protected void beforeMarkup() { final Set<StackState> state = scopeState.getFirst(); if (!state.contains(StackState.WROTE_DATA) && (depth > 0 || !state.isEmpty())) { final String indent = getIndent(this.depth, this.indentSize); final Characters indentEvent = xmlEventFactory.createCharacters(indent); try { wrappedWriter.add(indentEvent); } catch (XMLStreamException e) { // Ignore exceptions caused by indentation } afterMarkup(); // indentation was written } }
/** Prepare to write markup, by writing a new line and indentation. */ protected void beforeMarkup() { final Set<StackState> state = scopeState.getFirst(); if (!state.contains(StackState.WROTE_DATA) && (depth > 0 || !state.isEmpty())) { final String indent = getIndent(this.depth, this.indentSize); final Characters indentEvent = xmlEventFactory.createCharacters(indent); try { wrappedWriter.add(indentEvent); } catch (XMLStreamException e) { // Ignore exceptions caused by indentation } afterMarkup(); // indentation was written } }
afterMarkup(); return;