Reputation: 5934
So I have something like this:
var xmlStatement:String = "xmlObject.node[3].@thisValue";
What mystery function do I have to use so that I can execute xmlStatement and get thisValue from that xmlObject? Like....
var attribute:String = mysteryFunction(xmlStatement);
P.S. I know eval() works for actionscript2, I need the as3 solution. :)
Upvotes: 3
Views: 330
Reputation:
For your example it would be: var attribute : String = String( E4X.evaluate( XMLList(xmlobject) , 'node[3].@thisValue' ) );
Upvotes: 0
Reputation: 16085
Unfortunately this is not possible in ActionScript 3. This however might be a solution: http://blog.betabong.com/2008/09/23/e4x-string-parser/
Upvotes: 5