Version française
Home     About     Download     Resources     Contact us    

The Caml Hump: XML :: Parsers and pretty-printers

Bindings with C libraries
OCaml-xmlr [04-Apr-2004, version 1.0, Stable]
ocaml-xmlr provides bindings for libxml's xmlreader.
Author: Evan Martin.
Bindings with C libraries
OCamlExpat [14-Mar-2005, version 0.9.1, Beta] Has a Godi package
An ocaml wrapper for the Expat XML parsing library.
Toys - Examples
Octal [06-Mar-2006, Development code]
This is a toy implementation of Zope's TAL (Template Attribute Language) for OCaml, conveniently named 'Octal'. It is built on top of Camlp4 and Xml-Light. The purpose of TAL is to have a template that is a valid XML or HTML document that already renders like the resulting document.
Author: Bruno De Fraine.
Camlp4 extensions
OX [06-Oct-2003, version 0.1, Beta] Has a tutorial
OX is an XML integration into Objective-Caml, providing XML transducers based on pseudo-tree view. This gives a homogeneous view of XML within OCaml code, and lets users to manipulate such terms like any other ones, without constraint.
Native OCaml libraries
PXP [18-Jun-2012, version 1.2.3, Mature] Has a Godi packageHas a documentation
Polymorphic XML parser.
Author: Gerd Stolpmann.
Native OCaml libraries
saXml [24-Mar-2003, Alpha]
A couple of files for turning basic XML documents (channels) into an XML stream.
Author: Matthew W. Boyd.
Toys - Examples
Tony [09-Aug-2001, version 0..9.1, Beta]
Tony is a simple XML parser and pretty printer for Objective Caml. While you would most likely use it as a library it comes for demonstration purposes as an application. Tony reads an XML file and pretty prints it nicely. The parser is implemented using Lex and Yacc, the pretty printer using Philip Wadler's pretty-printing algebra. Today more complete (and complex) XML parsers for OCaml exist; Tony is still useful if you want to cover the basic case.
Native OCaml libraries
TyXML [19-Mar-2012, version 2.0.2, Stable]
Tyxml is a library that makes it almost impossible for your OCaml programs to generate wrong XML ouput, using static typing. Modules exist for XHTML1, HTML5 and SVG. Tyxml also defines pretty printers for these types.
Native OCaml libraries
Xhtml [09-Apr-2004, Beta]
XHTML is a O'Caml module for creating valid XHTML 1.1 (and XHTML 1.0) documents. The validity of the pages is guaranteed by the O'Caml type system. (NB: at the time of writing, forms support was not complete, only basic forms are implemented. Image maps are also not implemented yet.)
Author: Thorsten Ohl.
Native OCaml libraries
XML Light [14-Oct-2003, version 2, Stable]
XML Light is a minimal XML parser & printer for OCaml. It provide functions to parse an XML document into an OCaml data structure, work with it, and print it back to an XML document. Since version 2, XML Light add also support for DTD and PCDATA.
Camlp4 extensions
Xmllexer [21-Nov-2002, version 20021121, Beta]
xmllexer is an XML lexer for Camlp4. It is composed of one OCaml file (in revised syntax). is derived from the default lexer of Camlp4: (written by Daniel de Rauglaudre).
Author: Manuel Maarek.
Native OCaml libraries
xmlm [19-Mar-2012, version 1.1.0, Stable] Has a documentation
Xmlm is an OCaml module providing streaming XML input/output. It aims at making XML processing robust and painless. The streaming interface can process documents without building an in-memory representation. It lets the programmer translate its data structures to XML documents and vice-versa. Functions are provided to easily transform arborescent data structures to/from XML documents.
Author: Daniel Bunzli.