package other_examples.sax;

import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;

import util.Args;

public class StatsFiltered {
	public static void main(String[] args) {
		args = Args.argsOrDefault(args, "sklep.xml");
		
		try {
			
			XMLReader reader = XMLReaderFactory.createXMLReader();
			FiltrDuzeLitery filter = new FiltrDuzeLitery();
			StatsHandler myHandler = new StatsHandler();

			filter.setParent(reader);
			filter.setContentHandler(myHandler);

			filter.parse(args[0]);
			System.out.println(myHandler);
			
		} catch (Exception e) {
			e.printStackTrace();
		}		
	}
}
