import java.io.IOException;
import javax.xml.parsers.*;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
public class PrintAttributes {

  public static void main(String[] args) {
    DefaultHandler handler = new ContentHandlerPrintAttributes();
    SAXParserFactory factory = SAXParserFactory.newInstance();
    try {
          SAXParser parser = factory.newSAXParser();
          parser.parse("file:../mondial.xml", handler);  // <<<<<<<<< and now it runs
    } catch (ContentHandlerPrintAttributes.MySAXTerminatorException e) {
        // exception for smoothly stopping the processing:   <<<<<<<<<<<<<<<
        System.out.println(" ... Göttingen found - ready."); }
      catch (IOException e1) { e1.printStackTrace(); }
      catch (ParserConfigurationException e) { e.printStackTrace(); }
      catch (SAXException e) { e.printStackTrace(); }
}   }
