code: 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);
      }
docs: reads 2 XML Element Attribute ans cast it to a Credential
  
  @param el XML Element to read Attribute from it
  @param attributeUser Name of the user Attribute to read
  @param attributePassword Name of the password Attribute to read
  @param defaultCredentials
  @return Attribute Value