package markup

  1. Overview
  2. Docs
Error-recovering functional HTML5 and XML parsers and writers

Install

Dune Dependency

Authors

Maintainers

Sources

0.7.3.tar.gz
sha256=e1eb3562e0d26ccc33aa5dbe802e4210dbd7c30a8e69b6098b825afb11bb6af1
md5=05539bfde37e065187a9d7b22f5e8edb

Description

Markup.ml provides an HTML parser and an XML parser. The parsers are wrapped in a simple interface: they are functions that transform byte streams to parsing signal streams. Streams can be manipulated in various ways, such as processing by fold, filter, and map, assembly into DOM tree structures, or serialization back to HTML or XML.

Both parsers are based on their respective standards. The HTML parser, in particular, is based on the state machines defined in HTML5.

The parsers are error-recovering by default, and accept fragments. This makes it very easy to get a best-effort parse of some input. The parsers can, however, be easily configured to be strict, and to accept only full documents.

Apart from this, the parsers are streaming (do not build up a document in memory), non-blocking (can be used with threading libraries), lazy (do not consume input unless the signal stream is being read), and process the input in a single pass. They automatically detect the character encoding of the input stream, and convert everything to UTF-8.

Published: 01 Dec 2016

Dependencies (4)

  1. ocamlbuild build
  2. ocamlfind build
  3. uutf >= "1.0.0"
  4. ocaml < "4.12"

Dev Dependencies (1)

  1. ounit with-test

Conflicts (1)

  1. lwt >= "4.0.0"
OCaml

Innovation. Community. Security.