private void updateStudentInDB(Student student) throws ServerException {
		if (log.isDebugEnabled())
			log.debug("Method call. Arguments: " + student);
		NodeList groups = document.getElementsByTagName("group");
		Element group = getGroupNodeByNumber(groups, student.getGroupNumber());
		if (group == null) {
			ServerException ex = new ServerException(
					"Can not update student in DB");
			log.error("Exception", ex);
			throw ex;
		}
		Element studentsNode = (Element) group.getElementsByTagName("students")
				.item(0);
		if (studentsNode == null) {
			ServerException ex = new ServerException(
					"Can not update student in DB");
			log.error("Exception", ex);
			throw ex;
		}
		NodeList students = studentsNode.getChildNodes();
		for (int i = 0; i < students.getLength(); i++) {
			if (students.item(i).getAttributes() != null) {
				NamedNodeMap attrs = students.item(i).getAttributes();
				if (attrs.getNamedItem("id").getNodeValue()
						.equals(new Integer(student.getId()).toString())) {
					Element studentNode = (Element) students.item(i);
					studentNode.setAttribute("enrolled", student.getEnrolled());
					studentNode.setAttribute("firstname",
							student.getFirstName());
					studentNode.setAttribute("groupnumber",
							student.getGroupNumber());
					studentNode.setAttribute("id",
							new Integer(student.getId()).toString());
					studentNode.setAttribute("lastname", student.getLastName());
				}
			}
		}
	}