package xml-light

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type xml =
  1. | Element of string * (string * string) list * xml list
  2. | PCData of string
val parse_file : string -> xml
val parse_in : in_channel -> xml
val parse_string : string -> xml
type error_pos
type error_msg =
  1. | UnterminatedComment
  2. | UnterminatedString
  3. | UnterminatedEntity
  4. | IdentExpected
  5. | CloseExpected
  6. | NodeExpected
  7. | AttributeNameExpected
  8. | AttributeValueExpected
  9. | EndOfTagExpected of string
  10. | EOFExpected
type error = error_msg * error_pos
exception Error of error
exception File_not_found of string
val error : error -> string
val error_msg : error_msg -> string
val line : error_pos -> int
val range : error_pos -> int * int
val abs_range : error_pos -> int * int
exception Not_element of xml
exception Not_pcdata of xml
exception No_attribute of string
val tag : xml -> string
val pcdata : xml -> string
val attribs : xml -> (string * string) list
val attrib : xml -> string -> string
val children : xml -> xml list
val iter : (xml -> unit) -> xml -> unit
val map : (xml -> 'a) -> xml -> 'a list
val fold : ('a -> xml -> 'a) -> 'a -> xml -> 'a
val to_string : xml -> string
val to_string_fmt : xml -> string