+let get_document mathview () =
+ (match mathview#get_document with
+ | None -> print_string "no document loaded\n"
+ | Some doc ->
+ let name = "out.xml" in
+ ignore ((Gdome.domImplementation ())#saveDocumentToFile ~doc ~name ());
+ print_string ("document loaded and saved to " ^ name ^ "\n"));
+ flush stdout
+;;
+