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: Till Varoquaux <till.varoquaux@g...>
Subject: Re: [Caml-list] Fast XML parser
Ouch,

I beg to differ, if you want speed and can work stream (linear
top-down left-right exploration of the graph), you want an event based
xml parser. expat is probably one of the fastest (the c library is
known to be a speed demon). PXP does everything including talking
klingon and controlling the kitchen sink. It provides an event based
layer.
I have found Xml-light to be the simplest parser. Alas, it is so
simple it is far from implementing the full XML 1.1 specification.
This often isn't an issue since most XML files are written in a very
small subset of what the language.

Ultimately if you are parsing very simple files and are aiming for
pure speed you could write a simple lexer with ocamllex and use that
as base layer.

On 7/19/07, Gabriel Kerneis <gabriel.kerneis@enst.fr> wrote:
> Le Wed, 18 Jul 2007 14:58:35 -0700, "Luca de Alfaro"
> <luca@dealfaro.org> a écrit :
> > 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?
>
> You want it simple, you want it light : Xml-light.
>
> Regards,
> --
> Gabriel
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
>


-- 
http://till-varoquaux.blogspot.com/