Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Functor Xml_print.Make_typed_fmt

module Make_typed_fmt (Xml : Xml_sigs.Iterable) 
   (Typed_xml : Xml_sigs.Typed_xml     with module Xml := Xml) :
  
  Xml_sigs.Typed_pp
with type 'a elt := 'a Typed_xml.elt
and type doc := Typed_xml.doc

Printers for typed XML module, such as the one produced by Svg_f and Html_f.

Parameters :

Xml:Xml_sigs.Iterable
Typed_xml:Xml_sigs.Typed_xml with module Xml := Xml

type 'a elt
type doc
val pp_elt : 
  ?encode:(string -> string) ->
  unit -> Format.formatter -> 'a elt -> unit

pp_elt () is a Format printer for individual elements.

val pp : 
  ?encode:(string -> string) ->
  ?advert:string ->
  unit -> Format.formatter -> doc -> unit

pp () is a Format printer for complete documents.

It can be used in combination with "%a". For example, to get a string:

let s = Format.asprintf "%a" (pp ()) my_document