Library
Module
Module type
Parameter
Class
Class type
type name = Attributes.key
type attr_value = P.attr_value
type attributes = P.attr_value Attributes.t
val cdata_ : ?loc:Types.loc -> ?quoted:bool -> string -> Types.cdata
val comment_ : ?loc:Types.loc -> string -> Types.comment
val prolog_comment : ?loc:Types.loc -> string -> Types.comment
val xml_decl : ?loc:Types.loc -> attributes -> xml_decl
val prolog : ?decl:xml_decl -> ?doctype:doctype -> prolog_misc list -> prolog
val doc_empty : unit -> doc
val get_att : attributes -> name -> attr_value option
get_att atts name
returns the value associated to given attribute, if any.
val opt_att : attributes -> ?def:attr_value -> name -> attr_value
opt_att atts ?def name
returns the value associated to given attribute, or the default value specified by ?def
. If def
is not specified, P.default_attr_value
is used.
val atts_of_list : ?atts:attributes -> (name * attr_value) list -> attributes
atts_of_list list
returns a attributes
structure from the given list of pairs (name, value) ; (name, value) ; ...
.
val atts_one : ?atts:attributes -> name -> attr_value -> attributes
atts_one ?atts name value
is like atts_of_list
but for one attribute.
val atts_remove : name -> attributes -> attributes
atts_remove name attributes
removes the binding to name
from the attributes
.
val atts_replace : name -> attr_value -> attributes -> attributes
atts_replace name value attributes
adds a new bindings from name
to value
in attributes
. If name
was previously bound, the previous binding is removed.
val atts_fold :
(name -> attr_value -> 'acc -> 'acc) ->
attributes ->
'acc ->
'acc
val atts_empty : unit -> attributes
val pp_doc : Format.formatter -> doc -> unit
val pp : Format.formatter -> doc -> unit
val pp_attr : ?first:bool -> Format.formatter -> name -> attr_value -> unit
val pp_attributes : Format.formatter -> attributes -> unit
val pp_trees : Format.formatter -> tree list -> unit
val doc_to_string : doc -> string
val to_string : tree list -> string
val string_of_xml : tree -> string
val text_of_xmls : tree list -> string