在as3中判断xml节点是否存在以及判断xml某节点是否存在某属性可用下面方法:
1 if(xml.hasOwnProperty("frameRate")){ 2 trace("xml存在frameRate节点"); 3 } 4 if(xml.frameRate.@rate!=undefined){ 5 trace("xml的节点frameRate存在rate属性"); 6 }
在as3中判断xml节点是否存在以及判断xml某节点是否存在某属性可用下面方法:
1 if(xml.hasOwnProperty("frameRate")){ 2 trace("xml存在frameRate节点"); 3 } 4 if(xml.frameRate.@rate!=undefined){ 5 trace("xml的节点frameRate存在rate属性"); 6 }