I have a situation where I need to pull in different statements from the xml, based on values for a set of variables. e.g.
if a>10 and b<20 then string="ANCD"
if a>10 and (d+e)<0 then string="DEFG"
else string="XYZ"
Rather than build these conditions in code, is it possible to cleanly have them in xml in some structure like this, and code to parse the condition strings and get string value?
<conditionalstring>
<condition>"a>10 and b<20"</condition>
<string>"ANCD"</string>
</conditionalstring>
<conditionalstring>
<condition>"a>10 and (d+e)<0"</condition>
<string>"DEFG"</string>
</conditionalstring>
<conditionalstring>
<condition>default</condition>
<string>"XYZ"</string>
</conditionalstring>