I’m used to a very easy to implement, callback oriented php SAX parser from working with PHP for so long, and I’ve found a number of instances where I found myself wanting that capability in javascript. In addition, I tend to favor Extending objects to callback passing, as you don’t end up messing with scope issues. So what I really wanted was a simple base class I could extend to build whatever I happened to be working on at the moment. So I went out searching for something like this. The only remotely suitable option I found was XML for Script 3.1 which seemed dubious if only for the amount of time since it was last touched. I did a simple test though, and it seemed to be pretty solid. Relating to my earlier fondness for php’s simple 3 function interface made me want less of what I percieved to be an archaic interface, so I set out to build a MooTools wrapper I could then extend in the way I wanted.

Now to test this I wanted to parse some XML that was entertaining, and I had just been working with the Raphaël Library and had casually mentioned to a coworker that I supposed it would be possible to draw an SVG using raphael in all 3 browsers, most significantly IE if you could just parse it, and here I was with a pretty simple to implement parser. It couldn’t be that easy…

I have since been using Raphael, this XML parser, MooTools and jQuery in a much more sophisticated, yet still happy arrangement. Please, check out the demo, which uses Al MacDonald’s low resolution world image. Lemme know if you have questions…