Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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:

http://sandbox.merjis.com/release

Look at the file scripts/lib/wikilib.ml.

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
XHTML.

Rich.

-- 
Richard Jones
Red Hat