Module Xmlm.Make
Functor building streaming XML IO with the given strings and buffers.
Parameters
Signature
Basic types and values
Input
type pos
= int * int
type error
=[
|
`Max_buffer_size
|
`Unexpected_eoi
|
`Malformed_char_stream
|
`Unknown_encoding of string
|
`Unknown_entity_ref of string
|
`Unknown_ns_prefix of string
|
`Illegal_char_ref of string
|
`Illegal_char_seq of string
|
`Expected_char_seqs of string list * string
|
`Expected_root_element
]
type source
=[
|
`Channel of Stdlib.in_channel
|
`String of int * std_string
|
`Fun of unit -> int
]
type input
val make_input : ?enc:encoding option -> ?strip:bool -> ?ns:(string -> string option) -> ?entity:(string -> string option) -> source -> input
val input : input -> signal
val input_tree : el:(tag -> 'a list -> 'a) -> data:(string -> 'a) -> input -> 'a
val input_doc_tree : el:(tag -> 'a list -> 'a) -> data:(string -> 'a) -> input -> dtd * 'a
val peek : input -> signal
val eoi : input -> bool
val pos : input -> pos
Output
type 'a frag
=[
|
`El of tag * 'a list
|
`Data of string
]
type dest
=[
|
`Channel of Stdlib.out_channel
|
`Buffer of std_buffer
|
`Fun of int -> unit
]
type output
val make_output : ?decl:bool -> ?nl:bool -> ?indent:int option -> ?ns_prefix:(string -> string option) -> dest -> output
val output_depth : output -> int
val output : output -> signal -> unit
val output_tree : ('a -> 'a frag) -> output -> 'a -> unit
val output_doc_tree : ('a -> 'a frag) -> output -> (dtd * 'a) -> unit