Module Tyxml_xml
Basic functions for construction and manipulation of XML tree.
include Xml_sigs.Iterable
with type uri = string
and type event_handler = string
and type mouse_event_handler = string
and type keyboard_event_handler = string
and type touch_event_handler = string
include Xml_sigs.NoWrap
with type uri = string
with type event_handler = string
with type mouse_event_handler = string
with type keyboard_event_handler = string
with type touch_event_handler = string
module W = Xml_wrap.NoWraptype 'a wrap = 'a W.ttype 'a list_wrap = 'a W.tlisttype uri = stringtype aname = stringtype event_handler = stringtype mouse_event_handler = stringtype keyboard_event_handler = stringtype touch_event_handler = stringtype attribval event_handler_attrib : aname -> event_handler -> attribval mouse_event_handler_attrib : aname -> mouse_event_handler -> attribval keyboard_event_handler_attrib : aname -> keyboard_event_handler -> attribval touch_event_handler_attrib : aname -> touch_event_handler -> attribtype elttype ename = stringval empty : unit -> eltval comment : string -> eltval entity : string -> eltval cdata : string -> eltval cdata_script : string -> eltval cdata_style : string -> elttype separator = | Space| Comma
type acontent = private | AFloat of float| AInt of int| AStr of string| AStrL of separator * string list
include Xml_sigs.Pp with type elt := elt
val pp :
?encode:(string -> string) ->
?indent:bool ->
unit ->
Stdlib.Format.formatter ->
elt ->
unitpp () 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_xmlA custom encoding function can be provided with the ~encode argument. Various implementations of encode are available in Xml_print.
Import/Export
val of_seq : Xml_stream.signal Stdlib.Seq.t -> elt listIterators
Recursively edit attributes for the element and all its children.
Edit attributes only for one element.
The following can safely be exported by higher level libraries, because removing an attribute from a element is always legal.
Exporting the following by higher level libraries would drive a hole through a type system, because they allow to add any attribute to any element.
val all_entities : elt -> string listDeprecated printers
val print_list :
output:(string -> unit) ->
?encode:(string -> string) ->
elt list ->
unitval print : Stdlib.Format.formatter -> elt -> unit