private void onEndElement() throws XMLStreamException { depth--; if (state == SEEN_ELEMENT) { super.writeCharacters("\n"); doIndent(); } state = stateStack.pop(); }
public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException { onEmptyElement(); super.writeEmptyElement(prefix, localName, namespaceURI); }
public void writeEndElement() throws XMLStreamException { onEndElement(); super.writeEndElement(); }
public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException { onStartElement(); super.writeStartElement(prefix, localName, namespaceURI); }
/** * Set the current indent step. * * @param indentStep The new indent step (0 or less for no * indentation). * @see #getIndentStep() * * @deprecated * Should use the version that takes string. */ public void setIndentStep(int indentStep) { StringBuilder s = new StringBuilder(); for (; indentStep > 0; indentStep--) s.append(' '); setIndentStep(s.toString()); }
try { writer = xmlFactory.createXMLStreamWriter(new BufferedOutputStream(bos)); indentingXMLStreamWriter = new IndentingXMLStreamWriter(writer); Dom configBeanDom = Dom.unwrap(configBean); configBeanDom.writeTo(configBeanDom.model.getTagName(), indentingXMLStreamWriter); indentingXMLStreamWriter.flush(); s = bos.toString(); } catch (XMLStreamException e) { writer.close(); if (indentingXMLStreamWriter != null) indentingXMLStreamWriter.close(); } catch (IOException e) { if (LOG.isLoggable(Level.FINE)) {
try { writer = xmlFactory.createXMLStreamWriter(new BufferedOutputStream(fos)); IndentingXMLStreamWriter indentingXMLStreamWriter = new IndentingXMLStreamWriter(writer); doc.writeTo(indentingXMLStreamWriter); indentingXMLStreamWriter.close();
public void writeStartElement(String localName) throws XMLStreamException { onStartElement(); super.writeStartElement(localName); }
/** * Set the current indent step. * * @param indentStep The new indent step (0 or less for no * indentation). * @see #getIndentStep() * * @deprecated * Should use the version that takes string. */ public void setIndentStep(int indentStep) { StringBuilder s = new StringBuilder(); for (; indentStep > 0; indentStep--) s.append(' '); setIndentStep(s.toString()); }
private void onStartElement() throws XMLStreamException { stateStack.push(SEEN_ELEMENT); state = SEEN_NOTHING; if (depth > 0) { super.writeCharacters("\n"); } doIndent(); depth++; }
public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException { onEmptyElement(); super.writeEmptyElement(namespaceURI, localName); }
public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException { onStartElement(); super.writeStartElement(namespaceURI, localName); }
public void writeEndElement() throws XMLStreamException { onEndElement(); super.writeEndElement(); }
/** * Set the current indent step. * * @param indentStep The new indent step (0 or less for no * indentation). * @see #getIndentStep() * * @deprecated * Should use the version that takes string. */ public void setIndentStep(int indentStep) { StringBuilder s = new StringBuilder(); for (; indentStep > 0; indentStep--) s.append(' '); setIndentStep(s.toString()); }
private void onEmptyElement() throws XMLStreamException { state = SEEN_ELEMENT; if (depth > 0) { super.writeCharacters("\n"); } doIndent(); }
public void writeEmptyElement(String localName) throws XMLStreamException { onEmptyElement(); super.writeEmptyElement(localName); }
public void writeStartElement(String localName) throws XMLStreamException { onStartElement(); super.writeStartElement(localName); }
public void writeEndElement() throws XMLStreamException { onEndElement(); super.writeEndElement(); }
/** * Set the current indent step. * * @param indentStep The new indent step (0 or less for no * indentation). * @see #getIndentStep() * * @deprecated * Should use the version that takes string. */ public void setIndentStep(int indentStep) { StringBuilder s = new StringBuilder(); for (; indentStep > 0; indentStep--) s.append(' '); setIndentStep(s.toString()); }
private void onEndElement() throws XMLStreamException { depth--; if (state == SEEN_ELEMENT) { super.writeCharacters("\n"); doIndent(); } state = stateStack.pop(); }