开发者

problem in getting value of the object attribute in flex

开发者 https://www.devze.com 2022-12-13 10:03 出处:网络
i have an xml which contains \'interface\' sub tag, iam converting xml to object using SampleXmlDecoder.compiler did not allow me to access the value of the \'inteface\' attrible of the resultobject.

i have an xml which contains 'interface' sub tag, iam converting xml to object using SampleXmlDecoder. compiler did not allow me to access the value of the 'inteface' attrible of the resultobject.

var xml:XML = event.result as XML;
var xmlDoc : XMLDocument = new XML开发者_开发百科Document(xml.toString());
var decoder : SimpleXMLDecoder = new SimpleXMLDecoder(true)
var resultObj : Object = decoder.decodeXML(xmlDoc);
var o:Object = new Object();
o.someprop = resultObj.maintag.item.interface;  

its treating interface as keyword. can anyone tell me the solution for this. Thanks in advance


o.someprop = resultObj.maintag.item["interface"];
0

精彩评论

暂无评论...
验证码 换一张
取 消