public void cdata(String data, boolean escape) { if (this.open) { println('>'); this.open = false; } if (data != null) { printlnIndented(data, escape); } }
public XMLWriter(OutputStream output, ProcessingInstruction[] piElements) throws UnsupportedEncodingException { this.pw = new PrintWriter(new OutputStreamWriter(output, "UTF8"), false); //$NON-NLS-1$ println(ProcessingInstruction.XML_UTF8); this.elements = new Stack<String>(); this.open = false; this.indent = " "; //$NON-NLS-1$ if (piElements != null) { for (int i = 0; i < piElements.length; i++) { println(piElements[i].toString()); } } }
public void cdata(String data, boolean escape) { if (this.open) { println('>'); this.open = false; } if (data != null) { printlnIndented(data, escape); } }
public XMLWriter(OutputStream output, ProcessingInstruction[] piElements) throws UnsupportedEncodingException { this.pw = new PrintWriter(new OutputStreamWriter(output, "UTF8"), false); //$NON-NLS-1$ println(ProcessingInstruction.XML_UTF8); this.elements = new Stack<String>(); this.open = false; this.indent = " "; //$NON-NLS-1$ if (piElements != null) { for (int i = 0; i < piElements.length; i++) { println(piElements[i].toString()); } } }
public void end() { if (this.elements.empty()) { throw new EndWithoutStartError(); } String name = this.elements.pop(); if (this.open) { println("/>"); //$NON-NLS-1$ } else { printlnIndented("</" + name + '>', false); //$NON-NLS-1$ } this.open = false; }
public void end() { if (this.elements.empty()) { throw new EndWithoutStartError(); } String name = this.elements.pop(); if (this.open) { println("/>"); //$NON-NLS-1$ } else { printlnIndented("</" + name + '>', false); //$NON-NLS-1$ } this.open = false; }
public void start(String name) { if (this.open) { println('>'); } indent(); print('<'); print(name); this.elements.push(name); this.open = true; }
public void start(String name) { if (this.open) { println('>'); } indent(); print('<'); print(name); this.elements.push(name); this.open = true; }