public void serializeWithCache(OMOutput omOutput) throws XMLStreamException {
XMLStreamWriter writer = omOutput.getXmlStreamWriter();
if (textType == TEXT_NODE) {
writer.writeCharacters(this.value);
} else if (textType == COMMENT_NODE) {
writer.writeComment(this.value);
} else if (textType == CDATA_SECTION_NODE) {
writer.writeCData(this.value);
}
OMNode nextSibling = this.getNextSibling();
if (nextSibling != null) {