This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Java formulas in xml format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java formulas in xml format" Watch "Java formulas in xml format" New topic
Author

Java formulas in xml format

Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Hello,

I have mathematical formulas which will be used inside java code.

Is there a way or an API to express these formulas through XML and read it from code and execute it?

The reason for this is the formulas may change at any time.

Regards,


Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Karthik Shiraly
Ranch Hand

Joined: Apr 04, 2009
Posts: 489
    
    5
Here's one possible approach, using Java6 and its embedded Javascript script engine, to handle fairly complex math expressions without much DIY:

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

MathML is a standard way to represent mathematical formulas in XML.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

As far as I know, the purpose of MathML is more to specify mathematical formulas so that they can be rendered in mathematical form. It's not really meant to specify formulas so that you can fill in values and "execute" (calculate) the result of the formula.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Java formulas in xml format
 
Similar Threads
Math Equations
Array function similar to Excel Match?
POI 3.7 : Formulas refering to other formulas giving #VALUE! error
Formulas
Javac api