[Biojava-l] Java XFF parser

Thomas Down td2@sanger.ac.uk
Tue, 27 Mar 2001 11:00:36 +0100


I've been working on a new, event-driven XFF parser to replace
the slightly crufty old DOM-based one I was using before.  This
is now working quite nicely, and I've checked in into the
biojava-live CVS module in the package:

  org.biojava.bio.program.xff

It sits on top of my StAX APIs, so you get all the speed and
memory advantages of SAX-like event-driven parsing.  At the
same time, it's very modular, and you can easily plug in extra
handlers for new XFF feature and detail types.

It should handle all XFF featureSets matching my proposed
format version 0.2:

  http://www.biojava.org/thomasd/XFF/

(currently it also tolerates a few quirks left over from earlier
versions of XFF, but this will disappear soon).

XFF should still be considered a proposal for further discussion.
However, I've been using it for my own purposes, and needed a
good quality parser.  I hope the availability of this parser will
encourage wider experimentation with XFF, and more comments on the
format.

(It's also a very nice example of how you can use StAX to write
modular parsers for extensible XML formats)

Happy hacking,

   Thomas.