code: protected void serializeText(Text node) throws SAXException {
          if (fNextIsRaw) {
              fNextIsRaw = false;
              fSerializer.processingInstruction(
                  javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING,
                  "");
              dispatachChars(node);
              fSerializer.processingInstruction(
                  javax.xml.transform.Result.PI_ENABLE_OUTPUT_ESCAPING,
                  "");
          } else {
              // keep track of dispatch or not to avoid duplicaiton of filter code
              boolean bDispatch = false;
  
              // well-formed=true
              if ((fFeatures & WELLFORMED) != 0) {
                  isTextWellFormed(node);
              }
  
              // if the node is whitespace
              // Determine the Attr's type.
              boolean isElementContentWhitespace = false;
              if (fIsLevel3DOM) {
                  isElementContentWhitespace =
                         node.isElementContentWhitespace();
              }
  
              if (isElementContentWhitespace) {
                  // element-content-whitespace=true
                  if ((fFeatures & ELEM_CONTENT_WHITESPACE) != 0) {
                      bDispatch = true;
                  }
              } else {
                  bDispatch = true;
              }
  
              // apply the LSSerializer filter
              if (!applyFilter(node, NodeFilter.SHOW_TEXT)) {
                  return;
              }
  
              if (bDispatch) {
                  dispatachChars(node);
              }
          }
      }
docs: Serializes an Text Node.
  
  @param node The Text Node to serialize