Module XML_print
module XML_print : sig..end
Printer for XML.
val encode_unsafe_char : Buffer.t -> string -> unit
The encoder maps strings to HTML and must encode the unsafe characters
'<', '>', '"', '&' and the control characters 0-8, 11-12, 14-31, 127
to HTML entities. encode_unsafe is the default for ?encode in output
and pretty_print below. Other implementations are provided by the module
Netencoding in the
OcamlNet
library, e.g.:
let encode = Netencoding.Html.encode ~in_enc:`Enc_iso88591 ~out_enc:`Enc_usascii (),
Where national characters are replaced by HTML entities.
The user is of course free to write her own implementation.
See also OcamlNet
val encode_unsafe_char_and_at : Buffer.t -> string -> unit
In addition, encode "@" as "@" in the hope that this will fool simple minded email address harvesters.
val compose_decl : ?version:string -> ?encoding:string -> unit -> string
encoding is the name of the character encoding, e.g. "US-ASCII" or "UTF-8"
val compose_doctype : string -> string list -> string
module Make : functor (XML : XML_sigs.Iterable) ->
functor (I : sig val emptytags : string listend) ->
functor (O : XML_sigs.Output) ->
XML_sigs.Printerwith type out := O.out and type xml_elt := XML.elt
module MakeTyped : functor (XML : XML_sigs.Iterable) ->
functor (TypedXML : XML_sigs.TypedXML with module XML := XML) ->
functor (O : XML_sigs.Output) ->
XML_sigs.TypedPrinterwith type out := O.out
and type 'a elt := 'a TypedXML.elt
and type doc := TypedXML.doc
module MakeSimple : functor (XML : XML_sigs.Iterable) ->
functor (F : sig val emptytags : string listend) ->
XML_sigs.SimplePrinterwith type xml_elt := XML.elt
module MakeTypedSimple : functor (XML : XML_sigs.Iterable) ->
functor (TypedXML : XML_sigs.TypedXML with module XML := XML) ->
XML_sigs.TypedSimplePrinterwith type 'a elt := 'a TypedXML.elt
and type doc := TypedXML.doc