flush oc
;;
-let pp_to_outchan =
- let profiler = HExtlib.profile "Xml.pp_to_outchan" in
- fun strm oc -> profiler.HExtlib.profile (pp_to_outchan strm) oc
-
let pp_to_gzipchan strm oc =
pp_gen (fun s -> Gzip.output oc s 0 (String.length s)) strm
+;;
(** pretty printer to string *)
let pp_to_string strm =
| None -> pp_to_outchan strm stdout
;;
+let pp =
+ let profiler = HExtlib.profile "Xml.pp" in
+ fun ?gzip strm fn ->
+ profiler.HExtlib.profile (pp ?gzip strm) fn
+;;
+
let add_xml_declaration stream =
let box_prefix = "b" in
[<