Convert a String with a Math expression in Number result

Hi All,

I’ve this XML:

<myXml>

   <item>{0}+{1}-{2}</item>

</myXml>

I use bracket because with StringUtil class I can change values with some variables define by user.
So I must take the numeric result of my expression in XML, this is a simple example but I’ll have tang, sin and cos in XML nodevalue also…
I tried with casting or parseInt but nothig… any other idea?