Module Ocsigen_extensions.Configuration
This modules contains types and constructor for the description of XML configurations and the accordingly parsing.
type elementSpecification of a XML element.
type attributeSpecification of a XML attribute.
val element :
name:string ->
?obligatory:bool ->
?init:(unit -> unit) ->
?elements:element list ->
?attributes:attribute list ->
?pcdata:(string -> unit) ->
?other_elements:(string -> (string * string) list -> Xml.xml list -> unit) ->
?other_attributes:(string -> string -> unit) ->
unit ->
elementCreate the specification of a XML element.
val attribute :
name:string ->
?obligatory:bool ->
(string -> unit) ->
attributeattribute ~name f create a specification of a XML attribute.
val process_element :
in_tag:string ->
elements:element list ->
?pcdata:(string -> unit) ->
?other_elements:(string -> (string * string) list -> Xml.xml list -> unit) ->
Xml.xml ->
unitProcess an XML element by the specifications.
val process_elements :
in_tag:string ->
elements:element list ->
?pcdata:(string -> unit) ->
?other_elements:(string -> (string * string) list -> Xml.xml list -> unit) ->
?init:(unit -> unit) ->
Xml.xml list ->
unitApplication of process_element on a list of XML elements.
val ignore_blank_pcdata : in_tag:string -> string -> unitThe specification for ignoring blank PCDATA ('\n', '\r', ' ', '\t') and failing otherwise (a reasonable default).
val refuse_pcdata : in_tag:string -> string -> unit