import java.io.*;
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;

/**
 * Displays accident-reports contained in an incidents file
 *
 * @version  1.0
 * @author   Prof. David Bernstein, James Madison University
 */
public class AccidentReporter
{
 
    /**
     * The entry-point of the application
     *
     * @param args   The command line arguments
     */
   public static void main(String[] args) throws Exception
    {
	AccidentReportHandler  handler;
	File                   incidents;
	SAXParser              parser;
	SAXParserFactory       factory;


	incidents = new File("incidents.xml");
	factory   = SAXParserFactory.newInstance();
	parser    = factory.newSAXParser();
	handler   = new AccidentReportHandler();
	
	parser.parse(incidents, handler);
    }
}
