public final void writeCDataEnd() throws IOException { writeAscii("]]>"); }
public final void writeCommentStart() throws IOException { writeAscii("<!--"); }
public final void writeCommentEnd() throws IOException { writeAscii("-->"); }
public final void writeCDataStart() throws IOException { writeAscii("<![CDATA["); }
public final void writePIEnd() throws IOException { writeAscii(BYTE_QMARK, BYTE_GT); }
public void writeStartTagEnd() throws IOException { writeAscii(BYTE_GT); }
public void writeStartTagEmptyEnd() throws IOException { if (mAddSpaceAfterEmptyElem) { writeAscii(" />"); } else { writeAscii(BYTE_SLASH, BYTE_GT); } }
public final void writePIStart(String target, boolean addSpace) throws IOException { writeAscii(BYTE_LT, BYTE_QMARK); writeRaw(target); if (addSpace) { writeAscii(BYTE_SPACE); } }
public int writeCData(String data) throws IOException { writeAscii("<![CDATA["); int ix = writeCDataContent(data); if (ix >= 0) { return ix; } writeAscii("]]>"); return -1; }
public int writeCData(char[] cbuf, int offset, int len) throws IOException { writeAscii("<![CDATA["); int ix = writeCDataContent(cbuf, offset, len); if (ix >= 0) { return ix; } writeAscii("]]>"); return -1; }
public void writeEndTag(String localName) throws IOException { writeAscii(BYTE_LT, BYTE_SLASH); /* At this point, it is assumed caller knows that end tag * matches with start tag, and that it (by extension) has been * validated if and as necessary */ writeNameUnchecked(localName); writeAscii(BYTE_GT); }
public void writeEndTag(String prefix, String localName) throws IOException { writeAscii(BYTE_LT, BYTE_SLASH); /* At this point, it is assumed caller knows that end tag * matches with start tag, and that it (by extension) has been * validated if and as necessary */ if (prefix != null && prefix.length() > 0) { writeNameUnchecked(prefix); writeAscii(BYTE_COLON); } writeNameUnchecked(localName); writeAscii(BYTE_GT); }
public int writePI(String target, String data) throws IOException, XMLStreamException { writeAscii(BYTE_LT, BYTE_QMARK); writeName(target); if (data != null && data.length() > 0) { writeAscii(BYTE_SPACE); int ix = writePIData(data); if (ix >= 0) { // embedded "?>"? return ix; } } writeAscii(BYTE_QMARK, BYTE_GT); return -1; }
public void writeAttribute(String localName, char[] value, int offset, int len) throws IOException, XMLStreamException { writeAscii(BYTE_SPACE); writeName(localName); writeAscii(BYTE_EQ, BYTE_QUOT); if (len > 0) { if (mAttrValueWriter != null) { // custom escaping? mAttrValueWriter.write(value, offset, len); } else { // nope, default writeAttrValue(value, offset, len); } } writeAscii(BYTE_QUOT); }
public void writeEntityReference(String name) throws IOException, XMLStreamException { if (mSurrogate != 0) { throwUnpairedSurrogate(); } writeAscii(BYTE_AMP); writeName(name); writeAscii(BYTE_SEMICOLON); }
public void writeStartTagStart(String localName) throws IOException, XMLStreamException { writeAscii(BYTE_LT); writeName(localName); }
public void writeAttribute(String localName, String value) throws IOException, XMLStreamException { writeAscii(BYTE_SPACE); writeName(localName); writeAscii(BYTE_EQ, BYTE_QUOT); int len = value.length(); if (len > 0) { if (mAttrValueWriter != null) { // custom escaping? mAttrValueWriter.write(value, 0, len); } else { // nope, default writeAttrValue(value); } } writeAscii(BYTE_QUOT); }
public void writeAttribute(String prefix, String localName, char[] value, int offset, int len) throws IOException, XMLStreamException { writeAscii(BYTE_SPACE); writeName(prefix); writeAscii(BYTE_COLON); writeName(localName); writeAscii(BYTE_EQ, BYTE_QUOT); if (len > 0) { if (mAttrValueWriter != null) { // custom escaping? mAttrValueWriter.write(value, offset, len); } else { // nope, default writeAttrValue(value, offset, len); } } writeAscii(BYTE_QUOT); }
public void writeAttribute(String prefix, String localName, String value) throws IOException, XMLStreamException { writeAscii(BYTE_SPACE); writeName(prefix); writeAscii(BYTE_COLON); writeName(localName); writeAscii(BYTE_EQ, BYTE_QUOT); int len = value.length(); if (len > 0) { if (mAttrValueWriter != null) { // custom escaping? mAttrValueWriter.write(value, 0, len); } else { // nope, default writeAttrValue(value); } } writeAscii(BYTE_QUOT); }
public void writeStartTagStart(String prefix, String localName) throws IOException, XMLStreamException { if (prefix == null || prefix.length() == 0) { writeStartTagStart(localName); return; } writeAscii(BYTE_LT); writeName(prefix); writeAscii(BYTE_COLON); writeName(localName); }