public Credentials toCredentials(Element el,String attributeUser,String attributePassword,Credentials defaultCredentials){
  String user=el.getAttribute(attributeUser);
  String pass=el.getAttribute(attributePassword);
  if (user == null)   return defaultCredentials;
  if (pass == null)   pass="";
  return CredentialsImpl.toCredentials(user,pass);
}

public Credentials toCredentials ( Element el , String attributeUser , String attributePassword , Credentials defaultCredentials ) { String user = el . getAttribute ( attributeUser ) ; String pass = el . getAttribute ( attributePassword ) ; if ( user == null ) return defaultCredentials ; if ( pass == null ) pass = "" ; return CredentialsImpl . toCredentials ( user , pass ) ; }
reads 2 xml element attribute ans cast it to a credential
