Element root = document.addElement("root");
Element rooms = root.addElement("rooms");
for (Iterator<Rooms> it = roomList.iterator();it.hasNext();) {
Rooms r = it.next();
Element room = rooms.addElement("room");
room.addElement("name").addCDATA(""+r.getName());
room.addElement("rooms_id").addCDATA(""+r.getRooms_id());
room.addElement("deleted").addCDATA(""+r.getDeleted());
room.addElement("comment").addCDATA(""+r.getComment());
room.addElement("numberOfPartizipants").addCDATA(""+r.getNumberOfPartizipants());
room.addElement("appointment").addCDATA(""+r.getAppointment());
room.addElement("externalRoomId").addCDATA(""+r.getExternalRoomId());
room.addElement("externalRoomType").addCDATA(""+r.getExternalRoomType());
if (r.getRoomtype() != null) {
room.addElement("roomtypeId").addCDATA(""+r.getRoomtype().getRoomtypes_id());
} else {
room.addElement("roomtypeId").addCDATA(""+0);
}
if (r.getOwnerId() != null) {
room.addElement("ownerid").addCDATA(""+r.getOwnerId());
} else {
room.addElement("ownerid").addCDATA("");
}
if (r.getWaitForRecording() != null) {
room.addElement("waitForRecording").addCDATA(""+r.getWaitForRecording());
} else {
room.addElement("waitForRecording").addCDATA("");
}
if (r.getHideTopBar() != null) {
room.addElement("hideTopBar").addCDATA(""+r.getHideTopBar());
} else {
room.addElement("hideTopBar").addCDATA("");
}
if (r.getAllowRecording() != null) {
room.addElement("allowRecording").addCDATA(""+r.getAllowRecording());
} else {
room.addElement("allowRecording").addCDATA("");
}
room.addElement("isDemoRoom").addCDATA(""+r.getIsDemoRoom());
room.addElement("demoTime").addCDATA(""+r.getDemoTime());
room.addElement("isModeratedRoom").addCDATA(""+r.getIsModeratedRoom());
room.addElement("allowUserQuestions").addCDATA(""+r.getAllowUserQuestions());
room.addElement("isAudioOnly").addCDATA(""+r.getIsAudioOnly());
room.addElement("sipNumber").addCDATA(""+r.getSipNumber());
room.addElement("conferencePin").addCDATA(""+r.getConferencePin());
if (r.getIspublic() != null) {
room.addElement("ispublic").addCDATA(""+r.getIspublic());
} else {
r.setIspublic(false);
room.addElement("ispublic").addCDATA(""+r.getIspublic());
}
room.addElement("isClosed").addCDATA(""+r.getIsClosed());
room.addElement("redirectURL").addCDATA(""+r.getRedirectURL());
List<RoomModerators> roomModeratorsList = RoomModeratorsDaoImpl.getInstance().getRoomModeratorByRoomId(r.getRooms_id());
Element room_moderators = room.addElement("room_moderators");
for (RoomModerators roomModerator : roomModeratorsList) {