Module Tyxml_xmlSource
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
Source
val mouse_event_handler_attrib :
Tyxml_xml.aname ->
Tyxml_xml.mouse_event_handler ->
Tyxml_xml.attribSource
val keyboard_event_handler_attrib :
Tyxml_xml.aname ->
Tyxml_xml.keyboard_event_handler ->
Tyxml_xml.attribSource
val touch_event_handler_attrib :
Tyxml_xml.aname ->
Tyxml_xml.touch_event_handler ->
Tyxml_xml.attribSource
val node :
?a:Tyxml_xml.attrib list ->
Tyxml_xml.ename ->
Tyxml_xml.elt Tyxml_xml.list_wrap ->
Tyxml_xml.eltSource
type acontent = private | AFloat of float| AInt of int| AStr of string| AStrL of Tyxml_xml.separator * string list
Source
type econtent = private | Empty| Comment of string| EncodedPCDATA of string| PCDATA of string| Entity of string| Leaf of Tyxml_xml.ename * Tyxml_xml.attrib list| Node of Tyxml_xml.ename * Tyxml_xml.attrib list * Tyxml_xml.elt list
include Xml_sigs.Pp with type elt := Tyxml_xml.elt
Source
val pp :
?encode:(string -> string) ->
?indent:bool ->
unit ->
Stdlib.Format.formatter ->
Tyxml_xml.elt ->
unitImport/Export
Iterators
Source
val amap :
(Tyxml_xml.ename -> Tyxml_xml.attrib list -> Tyxml_xml.attrib list) ->
Tyxml_xml.elt ->
Tyxml_xml.eltRecursively edit attributes for the element and all its children.
Source
val amap1 :
(Tyxml_xml.ename -> Tyxml_xml.attrib list -> Tyxml_xml.attrib list) ->
Tyxml_xml.elt ->
Tyxml_xml.eltEdit 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.
Source
val rm_attrib_from_list :
(Tyxml_xml.aname -> bool) ->
(string -> bool) ->
Tyxml_xml.attrib list ->
Tyxml_xml.attrib listSource
val map_int_attrib :
(Tyxml_xml.aname -> bool) ->
(int -> int) ->
Tyxml_xml.attrib list ->
Tyxml_xml.attrib listSource
val map_string_attrib :
(Tyxml_xml.aname -> bool) ->
(string -> string) ->
Tyxml_xml.attrib list ->
Tyxml_xml.attrib listSource
val map_string_attrib_in_list :
(Tyxml_xml.aname -> bool) ->
(string -> string) ->
Tyxml_xml.attrib list ->
Tyxml_xml.attrib listExporting the following by higher level libraries would drive a hole through a type system, because they allow to add any attribute to any element.
Source
val add_string_attrib :
Tyxml_xml.aname ->
string ->
Tyxml_xml.attrib list ->
Tyxml_xml.attrib listSource
val add_comma_sep_attrib :
Tyxml_xml.aname ->
string ->
Tyxml_xml.attrib list ->
Tyxml_xml.attrib listSource
val add_space_sep_attrib :
Tyxml_xml.aname ->
string ->
Tyxml_xml.attrib list ->
Tyxml_xml.attrib listSource
val fold :
(unit -> 'a) ->
(string -> 'a) ->
(string -> 'a) ->
(string -> 'a) ->
(string -> 'a) ->
(Tyxml_xml.ename -> Tyxml_xml.attrib list -> 'a) ->
(Tyxml_xml.ename -> Tyxml_xml.attrib list -> 'a list -> 'a) ->
Tyxml_xml.elt ->
'aSource
val translate :
(Tyxml_xml.ename -> Tyxml_xml.attrib list -> Tyxml_xml.elt) ->
(Tyxml_xml.ename ->
Tyxml_xml.attrib list ->
Tyxml_xml.elt list ->
Tyxml_xml.elt) ->
('state -> Tyxml_xml.ename -> Tyxml_xml.attrib list -> Tyxml_xml.elt list) ->
('state ->
Tyxml_xml.ename ->
Tyxml_xml.attrib list ->
Tyxml_xml.elt list ->
Tyxml_xml.elt list) ->
(Tyxml_xml.ename -> Tyxml_xml.attrib list -> 'state -> 'state) ->
'state ->
Tyxml_xml.elt ->
Tyxml_xml.eltDeprecated printers
Source
val print_list :
output:(string -> unit) ->
?encode:(string -> string) ->
Tyxml_xml.elt list ->
unit