code: function(eventhandlerfactory) {
  
      var eventhandler = new function(){
  
      }
  
      var thehandler = function() {};
      thehandler.prototype.onStartDocument = function (funct){
        eventhandler.onStartDocument = funct;
      }
      thehandler.prototype.onEndDocument = function (funct){
        eventhandler.onEndDocument = funct;
      }
      thehandler.prototype.onStartElementNS = function (funct){
        eventhandler.onStartElementNS = funct;
      }
      thehandler.prototype.onEndElementNS = function (funct){
        eventhandler.onEndElementNS = funct;
      }
      thehandler.prototype.onCharacters = function(funct) {
        eventhandler.onCharacters = funct;
      }
      thehandler.prototype.onCdata = function(funct) {
        eventhandler.onCdata = funct;
      }
      thehandler.prototype.onComment = function(funct) {
        eventhandler.onComment = funct;
      }
      thehandler.prototype.onWarning = function(funct) {
        eventhandler.onWarning = funct;
      }
  
      thehandler.prototype.onError = function(funct) {
        eventhandler.onError = funct;
      }
  
  
      eventhandlerfactory(new thehandler());
      //eventhandler = eventhandler(eventhandler);
      this.m_hndDoc = eventhandler;
      this.m_hndErr = eventhandler;
      this.m_hndLex = eventhandler;
      this.m_interrupted = false;
  }
docs: SaxParser is an object that basically wraps an XMLP instance, and provides an event-based interface for parsing. This is the object users interact with when coding with XML for <SCRIPT>