private String convertMapToPlist(Object map)
			throws IllegalArgumentException, UnsupportedEncodingException,
			IllegalAccessException, InvocationTargetException, MDMException {

		StringBuffer resultBuffer = new StringBuffer();
		Set<?> keySet = (Set<?>) ((Map<?, ?>) map).keySet();
		Iterator<?> it = keySet.iterator();
		resultBuffer.append("\t<dict>\n");
		while (it.hasNext()) {
			Object key = it.next();
			Object value = ((Map<?, ?>) map).get(key);
			resultBuffer.append("\t<key>" + key + "</key>\n");
			resultBuffer.append(convertToPlist(value));
		}
		resultBuffer.append("\t</dict>\n");

		return resultBuffer.toString();
	}