The Biocaml Library : Biocaml_entrez.Make.Object_id

struct
type t = [`int of int | `string of string ]

let to_string = function
| `int i -> string_of_int i
| `string s -> s

let of_xml x =
try `int (ileaf_exn "Object-id_id" x)
with _ -> (
try `string (sleaf_exn "Object-id_str" x)
with _ ->
invalid_arg (sprintf "Entrez.Make.Object_id.of_xml: %s" (string_of_tree x))
)
end

AltStyle によって変換されたページ (->オリジナル) /