package SZXX

  1. Overview
  2. Docs

Module SZXX.XmlSource

Sourcetype attr_list = (string * string) list
Sourceval sexp_of_attr_list : attr_list -> Sexplib0.Sexp.t
Sourceval get_attr : attr_list -> string -> string option

Convenience function to access attributes by name

Sourceval preserve_space : attr_list -> bool

Convenience function to check whether a node has attribute xml:space="preserve"

Sourcemodule DOM : sig ... end
Sourcemodule SAX : sig ... end
Sourcetype parser_options = {
  1. accept_html_boolean_attributes : bool;
    (*

    Invalid XML but valid HTML: <div attr1="foo" attr2=bar> When this option is true, attr2 will be "bar"

    *)
  2. accept_unquoted_attributes : bool;
}
Sourceval default_parser_options : parser_options

IO-agnostic Angstrom.t parser.

It is not fully spec-compliant, it does not attempt to validate character encoding or reject all incorrect documents. It does not process references. It does not automatically unescape XML escape sequences automatically but unescape is provided to do so.

See README.md for examples on how to use it.

Sourceval unescape : string -> string

unescape "Fast &amp; Furious" returns "Fast & Furious"