Package

Source Code of PrincipalLattesParseUm

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

import org.ccil.cowan.tagsoup.Parser;
import org.ita.capes.professor.LattesSAXHandler;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;


public class PrincipalLattesParseUm {
  public static void main(String[] args){
    Parser parser = new Parser();
    FileInputStream fis = null;
    try {
      fis = new FileInputStream("C:\\Users\\Einstein\\workspace\\TG6_Parse\\src\\lattesExemplo.html");
      //fis = new FileInputStream("C:\\Users\\Einstein\\workspace\\TG6_Parse\\src\\lattesExemplo2.html");
      //fis = new FileInputStream("D:\\Lattes\\1234.html");
      //fis = new FileInputStream("D:\\Lattes\\3455.html");
      //fis = new FileInputStream("D:\\Lattes\\3454.html");
      //fis = new FileInputStream("D:\\Lattes\\3453.html");
      //fis = new FileInputStream("D:\\Lattes\\3550.html");
      //fis = new FileInputStream("D:\\Lattes\\3544.html");
      //fis = new FileInputStream("D:\\Lattes\\6.html");
      //fis = new FileInputStream("D:\\Lattes\\3442.html");//sem endereco
     
    } catch (FileNotFoundException e1) {
      e1.printStackTrace();
    }
    InputStream is = fis;
    LattesSAXHandler handler = new LattesSAXHandler();
    parser.setContentHandler(handler);
    InputSource input = new InputSource(is);
    try {
      parser.parse(input);
    } catch (IOException e) {
      e.printStackTrace();
    } catch (SAXException e) { 
      //e.printStackTrace();
    }
    handler.getCorrente();
  }
}
TOP

Related Classes of PrincipalLattesParseUm

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.