Markup_lwtSourceLwt interface to Markup.ml.
The majority of the functions in this interface are listed in the signature Markup.ASYNCHRONOUS, and are not directly included on this page. There are also additional Lwt functions in module Markup_lwt_unix. Those are based on Lwt_io, and have been separated to make this module Markup_lwt usable on js_of_ocaml, which does not support Lwt_io.
This module is available if Markup.ml is installed when Lwt is installed, i.e.
opam install lwt markupTo link with this module, depend on the findlib package markup.lwt instead of package markup.
include Markup.ASYNCHRONOUS with type 'a io := 'a Lwt.tAsynchronous counterpart to Markup.Encoding.
val parse_xml :
?report:(Markup.location -> Markup.Error.t -> unit Lwt.t) ->
?encoding:Encoding.t ->
?namespace:(string -> string option) ->
?entity:(string -> string option) ->
?context:[< `Document | `Fragment ] ->
(char, _) Markup.stream ->
Markup.async Markup.parserval write_xml :
?report:((Markup.signal * int) -> Markup.Error.t -> unit Lwt.t) ->
?prefix:(string -> string option) ->
([< Markup.signal ], _) Markup.stream ->
(char, Markup.async) Markup.streamval parse_html :
?report:(Markup.location -> Markup.Error.t -> unit Lwt.t) ->
?encoding:Encoding.t ->
?context:[< `Document | `Fragment of string ] ->
(char, _) Markup.stream ->
Markup.async Markup.parserval write_html :
?escape_attribute:(string -> string) ->
?escape_text:(string -> string) ->
([< Markup.signal ], _) Markup.stream ->
(char, Markup.async) Markup.streamval transform :
('a -> 'b -> ('c list * 'a option) Lwt.t) ->
'a ->
('b, _) Markup.stream ->
('c, Markup.async) Markup.streamval filter_map :
('a -> 'b option Lwt.t) ->
('a, _) Markup.stream ->
('b, Markup.async) Markup.streamload s converts a general stream s to a synchronous stream by buffering it.
val tree :
?text:(string list -> 'a) ->
?element:(Markup.name -> (Markup.name * string) list -> 'a list -> 'a) ->
?comment:(string -> 'a) ->
?pi:(string -> string -> 'a) ->
?xml:(Markup.xml_declaration -> 'a) ->
?doctype:(Markup.doctype -> 'a) ->
([< Markup.signal ], _) Markup.stream ->
'a option Lwt.tAdapts an Lwt stream to a Markup.ml stream.
Adapts a Markup.ml stream to an Lwt stream.