private Node makeCourseNode(CourseRec rec, Document dom, CourseModel model) {
		Element node = dom.createElement("Class");
		node.setAttribute("id", String.valueOf(rec.getId()));
		node.setAttribute("short", rec.getShortName());
		node.setAttribute("lang", rec.getLanguage());
		node.setAttribute("src", "" + rec.getSource().oneLetter());
		if (rec.isSelfStudy())
			node.setAttribute("ondem", "1");
		String str = "";
		for (DescRec dr : rec.getCategories())
			str = str + " " + dr.getId();
		if (!str.isEmpty())
			node.setAttribute("categories", str.substring(1));
		str = "";		
		for (DescRec dr : rec.getUniversities())
			try {
			str = str + " " + dr.getId();
			} catch (Exception e) {
				e.printStackTrace();				
			}
		if (!str.isEmpty())
			node.setAttribute("universities", str.substring(1));
		addChildIfNotNull(rec.getName(), "Name", node, dom);
		addChildIfNotNull(rec.getDescription(), "Long", node, dom);
		addChildIfNotNull(rec.getInstructor(), "Prof", node, dom);
		addChildIfNotNull(rec.getLink(), "Link", node, dom);

		Element group = dom.createElement("Offerings");
		node.appendChild(group);

		for (OffRec off : rec.getOfferings())
			group.appendChild(makeOfferingNode(off, dom));
		return node;
	}