/** * Write the element end to the supplied {@link Writer}. * * @param element The element. * @param writer The Writer. * @throws IOException Exception writing. */ public void writeEndElement(SAXElement element, Writer writer) throws IOException { SAXElementWriterUtil.writeEndElement(element, writer); }
/** * Write the element start to the supplied writer instance. * @param element The element. * @param writer The writer. * @throws IOException Exception writing. */ public void writeStartElement(SAXElement element, Writer writer) throws IOException { SAXElementWriterUtil.writeStartElement(element, writer, encodeSpecialChars); }
/** * Write the text content to the supplied {@link Writer}. * * @param text The text. * @param writer The Writer. * @throws IOException Exception writing. */ public void writeText(String text, Writer writer) throws IOException { SAXElementWriterUtil.writeText(text, TextType.TEXT, writer); }
protected void writeEnd(SAXElement element) throws IOException { if(!isStartWritten(element)) { // It's an empty element... SAXElementWriterUtil.writeEmptyElement(element, element.getWriter(writerOwner), rewriteEntities); } else { SAXElementWriterUtil.writeEndElement(element, element.getWriter(writerOwner)); } }
/** * Write the element as an empty (closed) element to the supplied {@link Writer}. * @param element The element. * @param writer The Writer. * @throws IOException Exception writing. */ public void writeEmptyElement(SAXElement element, Writer writer) throws IOException { SAXElementWriterUtil.writeEmptyElement(element, writer, encodeSpecialChars); }
public static void writeStartElement(SAXElement element, Writer writer, boolean encodeSpecialChars) throws IOException { if(writer != null) { writeUnclosedElement(element, writer, encodeSpecialChars); writer.write(">"); } }
private static void writeUnclosedElement(SAXElement element, Writer writer, boolean encodeSpecialChars) throws IOException { QName name = element.getName(); String prefix = name.getPrefix(); writer.write('<'); if(prefix != null && !prefix.equals(XMLConstants.NULL_NS_URI)) { writer.write(prefix); writer.write(':'); } writer.write(name.getLocalPart()); writeAttributes(element.getAttributes(), writer, encodeSpecialChars); }
protected void writeEnd(SAXElement element) throws IOException { if(!isStartWritten(element)) { // It's an empty element... SAXElementWriterUtil.writeEmptyElement(element, element.getWriter(writerOwner), rewriteEntities); } else { SAXElementWriterUtil.writeEndElement(element, element.getWriter(writerOwner)); } }
/** * Write the element as an empty (closed) element to the supplied {@link Writer}. * @param element The element. * @param writer The Writer. * @throws IOException Exception writing. */ public void writeEmptyElement(SAXElement element, Writer writer) throws IOException { SAXElementWriterUtil.writeEmptyElement(element, writer, encodeSpecialChars); }
public static void writeStartElement(SAXElement element, Writer writer, boolean encodeSpecialChars) throws IOException { if(writer != null) { writeUnclosedElement(element, writer, encodeSpecialChars); writer.write(">"); } }
private static void writeUnclosedElement(SAXElement element, Writer writer, boolean encodeSpecialChars) throws IOException { QName name = element.getName(); String prefix = name.getPrefix(); writer.write('<'); if(prefix != null && !prefix.equals(XMLConstants.NULL_NS_URI)) { writer.write(prefix); writer.write(':'); } writer.write(name.getLocalPart()); writeAttributes(element.getAttributes(), writer, encodeSpecialChars); }
/** * Write the text content to the supplied {@link Writer}. * * @param text The text. * @param writer The Writer. * @throws IOException Exception writing. */ public void writeText(String text, Writer writer) throws IOException { SAXElementWriterUtil.writeText(text, TextType.TEXT, writer); }
/** * Write the element start to the supplied writer instance. * @param element The element. * @param writer The writer. * @throws IOException Exception writing. */ public void writeStartElement(SAXElement element, Writer writer) throws IOException { SAXElementWriterUtil.writeStartElement(element, writer, encodeSpecialChars); }
protected void writeEnd(SAXElement element) throws IOException { if(!isStartWritten(element)) { // It's an empty element... SAXElementWriterUtil.writeEmptyElement(element, element.getWriter(writerOwner), rewriteEntities); } else { SAXElementWriterUtil.writeEndElement(element, element.getWriter(writerOwner)); } }
/** * Write the element end to the supplied {@link Writer}. * * @param element The element. * @param writer The Writer. * @throws IOException Exception writing. */ public void writeEndElement(SAXElement element, Writer writer) throws IOException { SAXElementWriterUtil.writeEndElement(element, writer); }
/** * Write the element as an empty (closed) element to the supplied {@link Writer}. * @param element The element. * @param writer The Writer. * @throws IOException Exception writing. */ public void writeEmptyElement(SAXElement element, Writer writer) throws IOException { SAXElementWriterUtil.writeEmptyElement(element, writer, encodeSpecialChars); }
public static void writeStartElement(SAXElement element, Writer writer, boolean encodeSpecialChars) throws IOException { if(writer != null) { writeUnclosedElement(element, writer, encodeSpecialChars); writer.write(">"); } }
private static void writeUnclosedElement(SAXElement element, Writer writer, boolean encodeSpecialChars) throws IOException { QName name = element.getName(); String prefix = name.getPrefix(); writer.write('<'); if(prefix != null && !prefix.equals(XMLConstants.NULL_NS_URI)) { writer.write(prefix); writer.write(':'); } writer.write(name.getLocalPart()); writeAttributes(element.getAttributes(), writer, encodeSpecialChars); }
/** * Write the text event content to the supplied {@link Writer} instance. * * @param text The SAXText event. * @param writer The Writer. * @throws IOException Exception writing. */ public void writeText(SAXText text, Writer writer) throws IOException { SAXElementWriterUtil.writeText(text, writer); }
/** * Write the element start to the supplied writer instance. * @param element The element. * @param writer The writer. * @throws IOException Exception writing. */ public void writeStartElement(SAXElement element, Writer writer) throws IOException { SAXElementWriterUtil.writeStartElement(element, writer, encodeSpecialChars); }