Apache flex 在Flash中,当e4x语句存储在字符串中时,如何运行该语句?
所以我有这样的想法:Apache flex 在Flash中,当e4x语句存储在字符串中时,如何运行该语句?,apache-flex,flash,actionscript-3,Apache Flex,Flash,Actionscript 3,所以我有这样的想法: var xmlStatement:String = "xmlObject.node[3].@thisValue"; 我必须使用什么神秘函数才能执行xmlStatement并从xmlObject获取该值?像 var attribute:String = mysteryFunction(xmlStatement); 另外,我知道eval()适用于actionscript2,我需要as3解决方案。:) 不幸的是,这在ActionScript 3中是不可能的。不过,这可能是一个
var xmlStatement:String = "xmlObject.node[3].@thisValue";
我必须使用什么神秘函数才能执行xmlStatement并从xmlObject获取该值?像
var attribute:String = mysteryFunction(xmlStatement);
另外,我知道eval()适用于actionscript2,我需要as3解决方案。:) 不幸的是,这在ActionScript 3中是不可能的。不过,这可能是一个解决方案:对于您的示例,它可能是: var属性:String=String(E4X.evaluate(XMLList(xmlobject),'node[3].@thisValue')