/*
 * This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public License
 *  as published by the Free Software Foundation.

 *  There is no copyright.

 *  MockwareTeam (C) 2009

 */

package core;


import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;


import org.xml.sax.SAXException;


import java.io.*;


/**
 *
 * @author yetkin
 */
public class Parser extends util{

    public Parser(){}

    public static void ParseXmlFile(String arg){
		DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); //bu DOM'a ilk giriş için

		xmlFile = new File(arg) ;
		try {

			DocumentBuilder db = dbf.newDocumentBuilder() ;
			doc = db.parse(xmlFile); //xml'i parse fonksiyonuna sokuosun

		} catch(ParserConfigurationException pce) {
			pce.printStackTrace();
		}catch(SAXException se) {
			se.printStackTrace();
		}catch(IOException ioe) {
			ioe.printStackTrace();
		}
	}
}
