MathML Parser written in ActionScript 3

In a similar fashion to my AS3 Graphing Classes, my MathML parser was created out of necessity. I was working on a project that had to display some equations, but drawing them out manually seemed a bit over the top.

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.

There should be a Flash Demo here...

Download:

For anyone who finds themselves in need of some MathML ActionScript classes, I have included a cleaned up version of my code for people to download here: MathML Classes

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.

{lang: 'en-GB'}
Posted in ActionScript | Tagged , , , , | 5 Comments

5 Responses to MathML Parser written in ActionScript 3

  1. rne1223 says:

    This is awesome…thanks for the time you put into it

  2. Heloy says:

    Thank you so much, this is really what I need…even if I still don’t know how to adapt it to my code ( I already have a XML in which I would like to put the formulas).

  3. meena says:

    this is awesome what i exactly want. thik u so much

  4. Santosh says:

    Hi,

    I have placed the following code as given, but it was throwing an error “Expecting right pare before colon.”

    var $sprite:Sprite = MathML.parse(MathML:XML[“test.xml”, $format:TextFormat=null, $embedFonts:Boolean=null ]);

    can anyone help?

  5. Francisco Lopez says:

    Hi,

    I would be grateful if you could share to me a complete example in how to use the MathML classes. I am a nearby.

    Thanks in advance,

    Francisco

Leave a Reply

Your email address will not be published. Required fields are marked *


9 × two =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>