Document doc = XMLUtil.newDocument("Wampum");
Element payeesElement = XMLUtil.newChildElement(doc.getDocumentElement(), "Payees", null);
DAOFactory daoFactory = new DAOFactory();
PayeeDAO payeeDAO = (PayeeDAO)daoFactory.getDAO("payee");
List payees = payeeDAO.load("", "ORDER BY NAME", true);
Payee payee = null;
for (int i=0; i<payees.size(); i++) {
payee = (Payee)payees.get(i);
XMLUtil.appendChildNode(payeesElement, PayeeXML.createXMLDocument(payee).getDocumentElement());
}