/** Constructor. */
 protected XMLContentHandler(String eventFile, String agentFile) {
   myEngine = EventEngine.theStack;
   agentTable = new Hashtable();
   try {
     XMLReader saxParser =
         (XMLReader) Class.forName("org.apache.xerces.parsers.SAXParser").newInstance();
     saxParser.setContentHandler(this);
     saxParser.setFeature("http://xml.org/sax/features/validation", true);
     // parse the xml specification for the event tags.
     saxParser.parse(agentFile);
     saxParser.parse(eventFile);
   } catch (SAXParseException spe) {
     // Error generated by the parser
     System.out.println(
         "\n** Parsing error" + ", line " + spe.getLineNumber() + ", uri " + spe.getSystemId());
     System.out.println("   " + spe.getMessage());
     // Use the contained exception, if any
     Exception x = spe;
     if (spe.getException() != null) x = spe.getException();
     x.printStackTrace();
     System.exit(0);
   } catch (SAXException sxe) {
     // Error generated by this application
     // (or a parser-initialization error)
     Exception x = sxe;
     if (sxe.getException() != null) x = sxe.getException();
     x.printStackTrace();
     System.exit(0);
   } catch (IOException ioe) {
     // I/O error
     ioe.printStackTrace();
     System.exit(0);
   } catch (Exception pce) {
     // Parser with specified options can't be built
     pce.printStackTrace();
     System.exit(0);
   }
 }