public void write(Entity entity) throws SAXException {
  String text=entity.getText();
  if (lexicalHandler != null) {
    String name=entity.getName();
    lexicalHandler.startEntity(name);
    write(text);
    lexicalHandler.endEntity(name);
  }
 else {
    write(text);
  }
}

public void write ( Entity entity ) throws SAXException { String text = entity . getText ( ) ; if ( lexicalHandler != null ) { String name = entity . getName ( ) ; lexicalHandler . startEntity ( name ) ; write ( text ) ; lexicalHandler . endEntity ( name ) ; } else { write ( text ) ; } }
generates sax events for the given entity
