Introducing Immanix: a Java library to process XML using parser combinators

Processing XML files is a PITA. There. I said it. Processing XML files using the Java standard XML API, i.e. JAXP is even worse. There are some nicer APIs out there that alleviate this pain, like XPATH, XStream, JAXB, Castor, etc.

But still, they all fail in some point or another, ranging from being verbose and tedious to write to not being able to handle large XML streams.
The latter is a killer for many of the higher level approaches out there. Try using XPATH or any mapping library on a file weighing more than a couple of megabytes.

To handle such cases, we are usually left with StAX. Don’t get me wrong: StAX is not that bad an API, and I’d take it any day instead of JAXP even for small files. It still is a very low level API and parsing the simplest of files requires an impressive amount of code. Also, handling state with StAX is a painful exercice. You usually end up building a full-fledged state machine to do it.

It’s in dealing with such cases that I thought that there must be a better way to do this. And that’s how immanix was born.
Read more of this post

Nouvelle page “I Wrote” qui référence quelques articles sur ce blog

Je viens de finir de porter 4 de mes 5 articles publiés sur developpez.com sur WordPress. Le processus n’était pas très amusant, je peux vous assurer xD

Pour les plus curieux d’entre vous, je décrirais dans le pragraphe suivant comment j’ai procédé, les autres, vous pouvez sauter cette étape sans problème 😀

Ceci assume que vous avez déjà un PC avec un (vrai) OS installé la dessus (Ubuntu 9.10 dans mon cas, malheureusement), un bon navigteur web (Chrome ici, quoi que, à cause de quelques bugs stupides dans l’affichage du backend de WP sur chrome, je suis obligé d’utiliser Firefox pour rédiger ce post) une (vraie) JVM (celle de Sun dans mon cas ) et Eclipse (3.5.1 dans mon cas).
Voici donc comment procéder si vous être dans la situation très improbable qu’est la mienne :

Read more of this post