Package examples.reporter

Source Code of examples.reporter.Run

/*
* $Id: Run.java,v 1.1.1.1 2004/02/01 19:23:43 nunnari Exp $
*
* Created on 24. gennaio 2004, 20:22
*/

package examples.reporter;

import ch.nunnisoft.xml.parser.NunniJXMLParserFSM;
import ch.nunnisoft.xml.parser.LogicError;
import java.io.*;

/**
*
* @author  Roberto Nunnari
*/
public class Run {
   
    /** Creates a new instance of Run */
    public Run() {
    }
   
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        String file = args[0];
        NunniJXMLParserFSM parser = new NunniJXMLParserFSM( null );

       System.out.println( "===============================" );
       System.out.println( "file: " + file );

       try {
           // This is all the code we need to parse
           // a document with our DocHandler.
           BufferedReader fr =  new BufferedReader( new FileReader( file ) );
           DocHandler handler = new DocHandler();
           parser.parse( fr, handler );
       }
       catch( IOException e ) {
           e.printStackTrace();
       }
       catch( LogicError e ) {
           e.printStackTrace();
       }
    }
}
TOP

Related Classes of examples.reporter.Run

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.