public boolean fromElement(Element ele) {
    boolean result = true;
    id = X.getAttribute(ele, C.id, null);
    type = X.getAttribute(ele, C.type, "mysql");
    ip = X.getFirstChildText(ele, C.ip, null);
    port = X.getFirstChildText(ele, C.port, null);
    user = X.getFirstChildText(ele, C.user, null);
    password = X.getFirstChildText(ele, C.password, null);
    result = !U.hasNull(id, ip, port, user, password);
    if (!result) {
      logger.error("Error in parsing <server>:" + ele.toString());
    }
    return result;
  }