code: public void setDateTime(Element el, String key, DateTime value) {
  	if (value != null) {
  	    String str = value.castToString(null);
  	    if (str != null) el.setAttribute(key, str);
  	}
      }
docs: sets a datetime value to a XML Element
  
  @param el Element to set value on it
  @param key key to set
  @param value value to set