class="xml" name="code"><students> <student> <name>a</name> <age>19</age> <course>math</cource> <course>english</cource> </student> </students>
Iterator it=stu.elementIterator("course"); while(itr.hasNext()){ Element node=(Element) itr.next(); System.out.println(node.getName()); System.out.println(node.getText()); }