package cow

  1. Overview
  2. Docs

Module Xml.MakeSource

Functor building streaming XML IO with the given strings and buffers.

Parameters

module String : String
module Buffer : Buffer with type string = String.t

Signature

Basic types and values

Sourcetype string = String.t
Sourcetype encoding = [
  1. | `UTF_8
  2. | `UTF_16
  3. | `UTF_16BE
  4. | `UTF_16LE
  5. | `ISO_8859_1
  6. | `US_ASCII
]
Sourcetype dtd = string option
Sourcetype name = string * string
Sourcetype attribute = name * string
Sourcetype tag = name * attribute list
Sourcetype signal = [
  1. | `Dtd of dtd
  2. | `El_start of tag
  3. | `El_end
  4. | `Data of string
]
Sourceval ns_xml : string
Sourceval ns_xmlns : string

Input

Sourcetype pos = int * int
Sourcetype error = [
  1. | `Max_buffer_size
  2. | `Unexpected_eoi
  3. | `Malformed_char_stream
  4. | `Unknown_encoding of string
  5. | `Unknown_entity_ref of string
  6. | `Unknown_ns_prefix of string
  7. | `Illegal_char_ref of string
  8. | `Illegal_char_seq of string
  9. | `Expected_char_seqs of string list * string
  10. | `Expected_root_element
]
Sourceexception Error of pos * error
Sourceval error_message : error -> string
Sourcetype source = [
  1. | `Channel of in_channel
  2. | `String of int * std_string
  3. | `Fun of unit -> int
]
Sourcetype input
Sourceval make_input : ?enc:encoding option -> ?strip:bool -> ?ns:(string -> string option) -> ?entity:(string -> string option) -> source -> input
Sourceval input : input -> signal
Sourceval input_tree : el:(tag -> 'a list -> 'a) -> data:(string -> 'a) -> input -> 'a
Sourceval input_doc_tree : el:(tag -> 'a list -> 'a) -> data:(string -> 'a) -> input -> dtd * 'a
Sourceval peek : input -> signal
Sourceval eoi : input -> bool
Sourceval pos : input -> pos

Output

Sourcetype 'a frag = [
  1. | `El of tag * 'a list
  2. | `Data of string
]
Sourcetype dest = [
  1. | `Channel of out_channel
  2. | `Buffer of std_buffer
  3. | `Fun of int -> unit
]
Sourcetype output
Sourceval make_output : ?decl:bool -> ?nl:bool -> ?indent:int option -> ?ns_prefix:(string -> string option) -> dest -> output
Sourceval output_depth : output -> int
Sourceval output : output -> signal -> unit
Sourceval output_tree : ('a -> 'a frag) -> output -> 'a -> unit
Sourceval output_doc_tree : ('a -> 'a frag) -> output -> (dtd * 'a) -> unit