In a similar fashion to my AS3 Graphing Classes, my MathML parser was created out of necessity.
Whilst working on a Mathematics learning object I was confronted with the problem of having to display many matematical equations.
I originally looked to see if anything was already available on the net but had no luck. Considering that the only other option was to create each equation manually, I decided to try and write my own MathML parser.
After a bit of research and playing around I came up with a set of classes that worked in a recursive manner to generate the equation.
The example file below demonstrates how the parser works.
For anyone who finds themselves in need of some MathML actionscript classes, I have included a cleaned up version of my code for download.
They are by no means a complete solution, but they may prove useful to someone. Feel free to use them as you see fit, but please don't harass me if you don't like my code ;-)
On the side note, there is a program called Amaya that can be used to generate MathML in a pretty easy to use interface. You can download it for free from here.
Oct 18, 2008 - Yet another update. This time ther was an issue with the alignment of <sqrt> tags. Should be all fixed now.
Oct 13, 2008 - Arghh. Another bug fix. Sorry guys but there was a bug with some of the sub script characters. It should all be working now.
Oct 11, 2008 - It was pointed out to me that one of the class files was missing from my Zip file. I've fixed it now and updated it on the server. I really need to stop doing updates late at night :)
A few people have been very generous and offered to make dontations for some of my work, so I have set up the following link to my paypal account.
I should point out that there is absolutely no obligation to make a donation when using my code. It is completely open source and free to be used however you wish.