package xmlm

  1. Overview
  2. Docs

Output signature of Make.

Basic types and values

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

Input

type pos = int * int
type 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
]
exception Error of pos * error
val error_message : error -> string
type source = [
  1. | `Channel of in_channel
  2. | `String of int * std_string
  3. | `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 = [
  1. | `El of tag * 'a list
  2. | `Data of string
]
type dest = [
  1. | `Channel of out_channel
  2. | `Buffer of std_buffer
  3. | `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
OCaml

Innovation. Community. Security.