package cow

  1. Overview
  2. Docs
type encoding = [
  1. | `ISO_8859_1
  2. | `US_ASCII
  3. | `UTF_16
  4. | `UTF_16BE
  5. | `UTF_16LE
  6. | `UTF_8
]
type dtd = string option
type name = string * string
type attribute = name * string
type tag = name * attribute list
type signal = [
  1. | `Data of string
  2. | `Dtd of dtd
  3. | `El_end
  4. | `El_start of tag
]
val ns_xml : string
val ns_xmlns : string
val pp_dtd : Format.formatter -> dtd -> unit
val pp_name : Format.formatter -> name -> unit
val pp_attribute : Format.formatter -> attribute -> unit
val pp_tag : Format.formatter -> tag -> unit
val pp_signal : Format.formatter -> signal -> unit
type pos = int * int
type error = [
  1. | `Expected_char_seqs of string list * string
  2. | `Expected_root_element
  3. | `Illegal_char_ref of string
  4. | `Illegal_char_seq of string
  5. | `Malformed_char_stream
  6. | `Max_buffer_size
  7. | `Unexpected_eoi
  8. | `Unknown_encoding of string
  9. | `Unknown_entity_ref of string
  10. | `Unknown_ns_prefix of string
]
val error_message : error -> string
exception Error of pos * error
type source = [
  1. | `Channel of Pervasives.in_channel
  2. | `Fun of unit -> int
  3. | `String of int * string
]
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
type !'a frag = [
  1. | `Data of string
  2. | `El of tag * 'a list
]
type dest = [
  1. | `Buffer of Buffer.t
  2. | `Channel of Pervasives.out_channel
  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 : output -> signal -> unit
val output_depth : output -> int
val output_tree : ('a -> 'a frag) -> output -> 'a -> unit
val output_doc_tree : ('a -> 'a frag) -> output -> (dtd * 'a) -> unit
type std_string = string
type std_buffer = Buffer.t
module type String = sig ... end
module type Buffer = sig ... end
module type S = sig ... end
module Make (String : String) (Buffer : sig ... end) : sig ... end
type t = 'a frag as 'a frag list
val to_string : ?decl:bool -> t -> string
val of_string : ?entity:(string -> string option) -> ?enc:encoding -> string -> t