-(* Parsing test:
- * - XmlPushParser version *)
-(*open Printf*)
-(*open XmlPushParser*)
-
-(*let print s = print_endline s; flush stdout*)
-
-(*let callbacks =*)
-(* { default_callbacks with*)
-(* start_element =*)
-(* Some (fun tag attrs ->*)
-(* let length = List.length attrs in*)
-(* print (sprintf "opening %s [%s]"*)
-(* tag (String.concat ";" (List.map fst attrs))));*)
-(* end_element = Some (fun tag -> print ("closing " ^ tag));*)
-(* character_data = Some (fun data -> print "character data ...");*)
-(* }*)
-
-(*let xml_parser = create_parser callbacks*)
-
-(*let _ = parse xml_parser (`File Sys.argv.(1))*)
-
-(* Parsing test:
- * - Pure expat version (without XmlPushParser mediation).
- * Originally written only to test if XmlPushParser mediation caused overhead.
- * That was not the case. *)
-
-(*let _ =*)
-(* let ic = open_in Sys.argv.(1) in*)
-(* let expat_parser = Expat.parser_create ~encoding:None in*)
-(* Expat.set_start_element_handler expat_parser*)
-(* (fun tag attrs ->*)
-(* let length = List.length attrs in*)
-(* print (sprintf "opening %s [%d attribute%s]"*)
-(* tag length (if length = 1 then "" else "s")));*)
-(* Expat.set_end_element_handler expat_parser*)
-(* (fun tag -> print ("closing " ^ tag));*)
-(* Expat.set_character_data_handler expat_parser*)
-(* (fun data -> print "character data ...");*)
-(* try*)
-(* while true do*)
-(* Expat.parse expat_parser (input_line ic ^ "\n")*)
-(* done*)
-(* with End_of_file -> Expat.final expat_parser*)
-