let db_of_file = fun filename ->
  let xml =
    try
      Xml.parse_file filename
    with
    | Xml.Error _ -> raise Invalid_db_file
    | Xml.File_not_found _ -> raise Invalid_db_file (* XXX Use an another exception ? *)
  in
  db_of_xml xml