Element root = document.addElement("root");
Element organisations = root.addElement("organisations");
for (Iterator<Organisation> it = orgList.iterator(); it.hasNext();) {
Organisation org = it.next();
Element organisation = organisations.addElement("organisation");
organisation.addElement("name").addCDATA(
formatString("" + org.getName()));
organisation.addElement("organisation_id").addCDATA(
formatString("" + org.getOrganisation_id()));
organisation.addElement("deleted").addCDATA(
formatString("" + org.getDeleted()));
}
return document;
}