package yocaml_syndication

  1. Overview
  2. Docs

Module Xml.AttrSource

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.

Types

Sourcetype t

Describes a key * value pair.

Sourcetype set

Describes a list of attributes. The set of attributes must be unique, and the type is backed up by a Map to ensure that an attribute (described by its key) is present only once.

API

Sourceval make : ('a -> string) -> ?ns:string -> key:string -> 'a -> t

make ?ns ~key f value Builds an arbitrary attribute value. The ns optional parameter allows to scope an attribute to a given namespace.

Sourceval string : ?ns:string -> key:string -> string -> t

string ?ns ~key value Builds a string attribute.

Sourceval int : ?ns:string -> key:string -> int -> t

int ?ns ~key value Builds an integer attribute.

Sourceval float : ?ns:string -> key:string -> float -> t

float ?ns ~key value Builds a float attribute.

Sourceval bool : ?ns:string -> key:string -> bool -> t

bool ?ns ~key value Builds a boolean attribute.

Sourceval char : ?ns:string -> key:string -> char -> t

char ?ns ~key value Builds a char attribute.

Sourceval escaped : ?ns:string -> key:string -> string -> t

escaped ?ns ~key value Build an attribute with special character replaced.

OCaml

Innovation. Community. Security.