Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Fast XML parser
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-07-19 (11:38)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Fast XML parser
On Wed, Jul 18, 2007 at 02:58:35PM -0700, Luca de Alfaro wrote:
> I am interested in parsing Wiki markup language that has a few tags, like
> <pre>...</pre>, <math>...,</math>.
> These tags are sparse, meaning that the ratio of number of tags / number of
> bytes is low.
> I would like, given a string (or a stream) with such tags, to parse it as
> fast as possible.  Efficiency is a primary consideration, and so is
> simplicity of the implementation.
> Do you have any advice about the library I should be using?

There's some code in COCANWIKI which does exactly this:

Look at the file scripts/lib/

It's not a particularly clever implementation, but it has a great deal
of testing in the real world.

As well as <xml>-like syntax it also does a lot of standard wiki
syntax like '* ' for bullet points, paragraphs, indents for
preformatted sections and so on.  And it outputs pure unadulterated


Richard Jones
Red Hat