Module Parser.Attributes

Helpers for getting attribute values

val get : Xmlm.name -> Xmlm.attribute list -> string option

get name attributes returns the attribute value for name in attributes.

val get_exn : Xmlm.name -> Xmlm.attribute list -> string

get_exn name attributes returns the attribute value for name in attributes.

  • raises Failure

    if the attribute is not present.

val optional : Xmlm.name -> Xmlm.attribute list -> string option t

optional name attributes returns a parser that returns the attribute value for name in attributes.

val required : Xmlm.name -> Xmlm.attribute list -> string t

required name attributes returns a parser that returns the attribute value for name in attributes and fails if the attribute is not present.