(String fileName)
| 10 | |
| 11 | public class People extends ArrayList<APerson> { |
| 12 | public People(String fileName) throws Exception { |
| 13 | Document doc = |
| 14 | new Builder().build(new File(fileName)); |
| 15 | Elements elements = |
| 16 | doc.getRootElement().getChildElements(); |
| 17 | for(int i = 0; i < elements.size(); i++) |
| 18 | add(new APerson(elements.get(i))); |
| 19 | } |
| 20 | public static void |
| 21 | main(String[] args) throws Exception { |
| 22 | People p = new People("People.xml"); |