public static void main(String[] args) throws JDOMException, IOException {

    SAXBuilder saxBuilder = new SAXBuilder();
        File file = new File("D:\\Java SE\\src\\xml\\jdom\\file.xml");


        Document document = (Document)saxBuilder.build(file);

        Element node = document.getRootElement();

        List list = node.getChildren("staff");

        for(int i =0 ; i < list.size(); i++){

            Element element = (Element)list.get(i);

            System.out.println(element.getChildText("firstname"));

        }


    }