List of utility methods to do XMLStreamWriter
void | writeEndElement(XMLStreamWriter out, QName name) write End Element if (name == null) return; out.writeEndElement(); |
void | writeFloat(String name, float value, XMLStreamWriter writer) write Float if (!Float.isNaN(value)) {
writer.writeAttribute(name, Float.toString(value));
|
void | writeFooter(XMLStreamWriter w) write Footer w.writeEndElement(); w.writeEndElement(); w.writeEndElement(); |
void | writeIndent(XMLStreamWriter xmlsw, String indent) write Indent xmlsw.writeCharacters(indent); |
void | writeInsertPos(XMLStreamWriter w, boolean isBefore, int[] pos) write Insert Pos if (isBefore) w.writeEmptyElement("before"); else w.writeEmptyElement("after"); w.writeAttribute("begin_line", Integer.toString(pos[0])); w.writeAttribute("begin_col", Integer.toString(pos[1])); w.writeAttribute("end_line", Integer.toString(pos[0])); w.writeAttribute("end_col", Integer.toString(pos[1])); ... |
void | writePath(XMLStreamWriter w, Supplier Write an SVG Path element
try { w.writeStartElement("path"); writeSvgAttributes(w, cssClass, fill, stroke); w.writeAttribute("d", path.get()); w.writeEndElement(); } catch (XMLStreamException ex) { throw new RuntimeException(ex); |
void | writeSimpleTag(XMLStreamWriter writer, String tag, Object value, boolean asCData) Write a "simple" tag writer.writeStartElement(tag); if (asCData) writer.writeCData(String.valueOf(value)); else writer.writeCharacters(String.valueOf(value)); writer.writeEndElement(); |
void | writeStartElement(XMLStreamWriter writer, QName name) Write a start element. String ns = name.getNamespaceURI(); if (ns != null && !ns.isEmpty()) { writer.writeStartElement(name.getNamespaceURI(), name.getLocalPart()); } else { writer.writeStartElement(name.getLocalPart()); |
void | writeTag(XMLStreamWriter xmlWriter, String tag, Object value) write Tag if (value == null) { xmlWriter.writeEmptyElement(tag); } else { xmlWriter.writeStartElement(tag); xmlWriter.writeCData(value.toString()); xmlWriter.writeEndElement(); |
void | writeWithCharacters(XMLStreamWriter w, String localName, String text) write With Characters w.writeStartElement(localName); w.writeCharacters(text); w.writeEndElement(); |