public List<CalendarObject> loadFile(String filename){
        myFile = new File(filename);
        try {
            myDocument = builder.build(myFile);
        } catch (JDOMException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

        List<CalendarObject> ret = new ArrayList<CalendarObject>();
        Element rootNode = myDocument.getRootElement();
        List<?> list = rootNode.getChildren();
        List<Element> eventList = new ArrayList<Element>();
        for (int i = 0; i < list.size(); i++) {
            Element currentEvent = (Element) list.get(i);
            eventList.add(currentEvent);
        }
        ParserClassifier pc = new ParserClassifier(filename);
        AbstractCalendarParser acp = pc.getParserType();
        ret = acp.parseEvents(eventList);
        System.out.println(ret.size() + " events parsed");
        return ret;

    }