Functor Xml_print.Make_fmt
module Make_fmt (Xml : Xml_sigs.Iterable)
(I : TagList) :
Xml_sigs.Ppwith type elt := Xml.elt
Printers for raw XML modules.
Parameters :
Xml | : | Xml_sigs.Iterable |
I | : | Xml_print.TagList |
type elt
val pp :
?encode:(string -> string) ->
?indent:bool -> unit -> Format.formatter -> elt -> unit
pp () is a Format printer for untyped XML.
It can be used in combination with "%a". For example, to get a string:
let s = Format.asprintf "%a" (pp ()) my_xml
A custom encoding function can be provided with the ~encode argument. Various implementations of encode are available in Xml_print.