code: @Override
      public void characters(char[] ch, int start, int length)
              throws SAXException {
          try {
              for (int j = 0; j < length; j++) {
                  char c = ch[start + j];
                  switch (c) {
                      case '<':
                          this.writer.write("&lt;");
                          break;
                      case '>':
                          this.writer.write("&gt;");
                          break;
                      case '&':
                          this.writer.write("&amp;");
                          break;
                      default:
                          this.writer.write(c);
                  }
              }
          } catch (IOException ioe) {
              throw (SAXException)new SAXException(ioe).initCause(ioe);
          }
      }
docs: Writes out characters.
  
  @param ch
  the source array
  @param start
  the index of the first character to be written
  @param length
  the number of characters to write
  
  @throws SAXException
  if there are IO problems