Library
Module
Module type
Parameter
Class
Class type
Tool for structuring (and printing) XML, used as a basis for describing XML nodes. The implementation is rather naive, but its purpose is simply to describe syndication flows, hence the "simplicity of the implementation".
The first version lived in the Yocaml
package and was based on an imoderate use of existentials.
Compose with XML attributes in the form `key="value"`.
module Attr : sig ... end
An attribute is an association between a key and a value (quoted). Please note that this library does not guarantee that the key or value is correctly formatted, and it is the user's responsibility to produce only correct values.
Description of XML nodes (or leaves).
Describes an XML node. An XML tree can be described by a node
(a branch made up of branches) or by a leaf
(a branch containing a PCDATA character string).
Create a complete XML document.
Describes a node that only contains PCDATA.
cdata txt
compose with leaf
to allow special chars.
escape txt
compose with leaf
to escape special chars.
Describesa node that contains nested nodes.
namespace ~ns node
adds a namespace to the node and every node children.
val may_leaf :
?indent:bool ->
?finalize:(string -> string option) ->
name:string ->
('a -> string) ->
'a option ->
node
may_leaf ~name f x
May build a leaf
.
val to_string : t -> string
Pretty printer for XML document.