Element organisations = root.addElement("room_organisations");
for (Iterator<Rooms_Organisation> it = roomOrgList.iterator(); it
.hasNext();) {
Rooms_Organisation roomOrg = it.next();
Element room_organisation = organisations
.addElement("room_organisation");
room_organisation.addElement("rooms_organisation_id").addCDATA(
formatString("" + roomOrg.getRooms_organisation_id()));
room_organisation.addElement("organisation_id").addCDATA(
"true".equals(roomOrg.getDeleted()) ? "0" :
formatString(""
+ roomOrg.getOrganisation().getOrganisation_id()));
if (roomOrg.getRoom() != null) {
room_organisation.addElement("rooms_id").addCDATA(
formatString("" + roomOrg.getRoom().getRooms_id()));
} else {
room_organisation.addElement("rooms_id").addCDATA("0");
}
room_organisation.addElement("deleted").addCDATA(
formatString("" + roomOrg.getDeleted()));
}
return document;
}