private void flushCharacters(final String data) throws SAXException {
    if (data.length() == 0 && !inCDATA) {
      previousCDATA = inCDATA;
      return;
    }

    /*
      This is commented out because of some problems with the inline DTDs
      that Xerces seems to have. if (!inDTD) { if (inEntity) {
      getCurrentElement().setContent(factory.text(data)); } else {
      getCurrentElement().addContent(factory.text(data)); }
     */

    if (previousCDATA) {
      final CDATA cdata = currentLocator == null ? factory.cdata(data)
                                                 : factory.cdata(lastline, lastcol, data);
      factory.addContent(getCurrentElement(), cdata);
    }
    else if (data.length() != 0) {
      final Text text = currentLocator == null ? factory.text(data)
                                               : factory.text(lastline, lastcol, data);
      factory.addContent(getCurrentElement(), text);
    }

    previousCDATA = inCDATA;
  }
private void flushCharacters(final String data)