MathML has both semantic and presentational mark-up. So a generic MathML parser for evaluation is not possible.
I don't know of an actual implementation, some quick Googling did not find any reasonable results, but it basically boils down to writing your Polish expression interpreter (as the example you gave is in Polish notation). The steps:
- get an XML parser and read in the document
- walk through the tree
- if you encounter a known operation or element, pop it on a stack
- when the subexpression is complete, parse it (or better: wait for the entire expression to finish, look for the last operation, perform it with the number of arguments its arity prescribes and perform this until no operations are left)
At the end you'll have your result on the stack.