package rss

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Parsing/Printing RSS documents.

type xmltree =
  1. | E of Xmlm.tag * xmltree list
  2. | D of string
val string_of_xml : ?ns_prefix:(string -> string option) -> ?indent:int -> xmltree -> string
val source_string : [< `Channel of 'a | `Fun of 'b | `String of int * string ] -> string
val is_space : char -> bool
val trim : string -> string
val xml_of_source : Xmlm.source -> xmltree

Parsing

type ('a, 'b) opts = {
  1. mutable errors : string list;
  2. read_channel_data : (xmltree list -> 'a option) option;
  3. read_item_data : (xmltree list -> 'b option) option;
}
val add_error : ('a, 'b) opts -> string -> unit
exception Error of string
val error : string -> 'a
val find_ele : string -> xmltree -> bool
val apply_opt : ('a -> 'b) -> 'a option -> 'b option
val get_att : ?ctx:(('a, 'b) opts * string) -> ?required:bool -> ((string * string) * string) list -> string -> string
val get_opt_att : ((string * string) * 'a) list -> string -> 'a option
val get_source : ('a, 'b) opts -> xmltree list -> Rss_types.source option
val get_enclosure : ('a, 'b) opts -> xmltree list -> Rss_types.enclosure option
val get_categories : ('a, 'b) opts -> xmltree list -> Rss_types.category list
val get_guid : ('a, 'b) opts -> xmltree list -> Rss_types.guid option
val get_cloud : ('a, 'b) opts -> xmltree list -> Rss_types.cloud option
val find_sub_cdata : string -> xmltree list -> string -> string
val get_image : ('a, 'b) opts -> xmltree list -> Rss_types.image option
val get_text_input : ('a, 'b) opts -> xmltree list -> Rss_types.text_input option
val filter_prefixed_nodes : xmltree list -> xmltree list
val read_ns_data : (xmltree list -> 'a option) option -> xmltree list -> 'a option
val item_of_xmls : ('a, 'b) opts -> xmltree list -> 'b Rss_types.item_t option
val items_of_xmls : ('a, 'b) opts -> xmltree list -> 'b Rss_types.item_t list
val get_skip_hours : ('a, 'b) opts -> xmltree list -> int list option
val int_of_day : string -> int
val day_of_int : int -> string
val get_skip_days : ('a, 'b) opts -> xmltree list -> int list option
val channel_of_source : ('a, 'b) opts -> Xmlm.source -> ('a, 'b) Rss_types.channel_t * string list
val make_opts : ?read_channel_data:(xmltree list -> 'a option) -> ?read_item_data:(xmltree list -> 'b option) -> unit -> ('a, 'b) opts
val default_opts : ('a, 'b) opts
val channel_of_string : ('a, 'b) opts -> string -> ('a, 'b) Rss_types.channel_t * string list
val channel_of_file : ('a, 'b) opts -> string -> ('a, 'b) Rss_types.channel_t * string list
val channel_of_channel : ('a, 'b) opts -> Stdlib.in_channel -> ('a, 'b) Rss_types.channel_t * string list
val channel_of_xmls : ('a, 'b) opts -> xmltree list -> ('a, 'b) Rss_types.channel_t * string list

Printing

val opt_element : string option -> string -> xmltree list
val default_date_format : string
val err_date : 'a -> unit
val xml_of_category : Rss_types.category -> xmltree
val xmls_of_categories : Rss_types.category list -> xmltree list
val xmls_of_opt_f : ('a -> 'b) -> 'a option -> 'b list
val xml_of_enclosure : Rss_types.enclosure -> xmltree
val xmls_of_enclosure_opt : Rss_types.enclosure option -> xmltree list
val xml_of_guid : Rss_types.guid -> xmltree
val xmls_of_guid_opt : Rss_types.guid option -> xmltree list
val xml_of_source_field : Rss_types.source -> xmltree
val xmls_of_source_opt : Rss_types.source option -> xmltree list
val xml_of_image : Rss_types.image -> xmltree
val xmls_of_image_opt : Rss_types.image option -> xmltree list
val xml_of_cloud : Rss_types.cloud -> xmltree
val xmls_of_cloud_opt : Rss_types.cloud option -> xmltree list
val xml_of_skip_hours : int list -> xmltree
val xmls_of_skip_hours_opt : int list option -> xmltree list
val xml_of_skip_days : int list -> xmltree
val xmls_of_skip_days_opt : int list option -> xmltree list
val xml_of_text_input : Rss_types.text_input -> xmltree
val xmls_of_text_input_opt : Rss_types.text_input option -> xmltree list
val xml_of_item : ?item_data_printer:('a -> xmltree list) -> 'a Rss_types.item_t -> xmltree
val xml_of_channel : ?channel_data_printer:('a -> xmltree list) -> ?item_data_printer:('b -> xmltree list) -> ('a, 'b) Rss_types.channel_t -> xmltree
module SMap : sig ... end
val print_channel : ?channel_data_printer:('a -> xmltree list) -> ?item_data_printer:('b -> xmltree list) -> ?indent:int -> ?encoding:string -> Stdlib.Format.formatter -> ('a, 'b) Rss_types.channel_t -> unit
OCaml

Innovation. Community. Security.