markupversion
Error-recovering functional HTML5 and XML parsers and writers
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.
Author | Anton Bachin <antonbachin@yahoo.com> |
---|---|
License | BSD-3-Clause |
Published | |
Homepage | https://github.com/aantron/markup.ml |
Issue Tracker | https://github.com/aantron/markup.ml/issues |
Maintainer | Anton Bachin <antonbachin@yahoo.com> |
Dependencies | |
Optional dependencies | |
Source [http] | https://github.com/aantron/markup.ml/archive/0.7.7.tar.gz sha256=fbb1083e659d57e4ec4ad1ac2bdaa7cde73449ee896f731d7af982211efb9b70 md5=44b9dca277115c478ebbde081de43436 |
Edit | https://github.com/ocaml/opam-repository/tree/master/packages/markup/markup.0.7.7/opam |
- lambdasoup>=0.6 & <0.7.2
- learn-ocaml
- ppx_bsx
- tyxml-ppx
- valentinebuild
- tyxml>=4.0.0 & <4.3.0