public DateTime toDateTime(Element el,String attributeName,DateTime defaultValue){
  String value=el.getAttribute(attributeName);
  if (value == null)   return defaultValue;
  DateTime dtValue=Caster.toDate(value,false,null,null);
  if (dtValue == null)   return defaultValue;
  return dtValue;
}

public DateTime toDateTime ( Element el , String attributeName , DateTime defaultValue ) { String value = el . getAttribute ( attributeName ) ; if ( value == null ) return defaultValue ; DateTime dtValue = Caster . toDate ( value , false , null , null ) ; if ( dtValue == null ) return defaultValue ; return dtValue ; }
reads a xml element attribute ans cast it to a datetime
