XML libraries, again
gk at ninebynine.org
Tue Mar 23 12:11:42 EST 2004
Further to my previous message:
I've spent some more time getting to know the HaXml and HXml toolbox
libraries. I've written a simple (HUnit-based) test module which might be
a basis for future regression tests for either library (with small
modifications), though for now it performs only very few simple tests.
I have now been able to isolate the XML parser in HXml Toolbox from the
IO-bound XmlFilter logic, so I can use it outside the IO monad. This
turned out to be easier than I first feared. In so doing, the previously
suspected inability to catch errors in the program is overcome.
I've also spent a little time with the HaXml library, and modified the
parser (HMW) combinator code so that errors are passed back via an (Either
String a) value, rather than simply throwing an error, so that a calling
program can take control of error conditions.
Overall, I'm finding the codebases comparable to work with. On my limited
experience to date, HaXml has been easier to get into, but looking easier
to make more fundamental structural modifications with HXml Toolbox. Given
thatr HXml Toolbox already has much of the functionality I require, I am
planning (for now) to continue with that.
Copies of my (current) working codebases can be found at:
In each case, my test module is in a new subdirectory 'test'.
More information about the Libraries