AS3 Flash CS5-XML节点过滤器?
我确实找到了这段代码(略加编辑):AS3 Flash CS5-XML节点过滤器?,xml,actionscript-3,flash,Xml,Actionscript 3,Flash,我确实找到了这段代码(略加编辑): var目的地:XML= 400 武士史 140 冲浪和烧烤 30 食物 ; //按属性名称筛选------------------- var filteredByLocation:XMLList=destinations.destination.(@location==“japan”); 跟踪(“属性名称:”+filteredByLocation); //按节点值筛选---------------------- var filteredByExchangeRa
var目的地:XML=
400
武士史
140
冲浪和烧烤
30
食物
;
//按属性名称筛选-------------------
var filteredByLocation:XMLList=destinations.destination.(@location==“japan”);
跟踪(“属性名称:”+filteredByLocation);
//按节点值筛选----------------------
var filteredByExchangeRate:XMLList=destinations.destination.(exchangeRate<200);
跟踪(“节点值:”+filteredByExchangeRate);
我想知道是否有可能做相反的事情。我的意思是,获取所有内容,但不获取具有属性名称的节点
提前感谢您的帮助。我太困了:
//FILTER BY ATTRIBUTE NAME -------------------
var filteredByLocation:XMLList = destinations.destination.(@location != "japan");
trace("Attribute Name: "+filteredByLocation);
无论如何,它对那里的人可能有用。试试
destinations.destination。(@location!=“japan”)代码>谢谢@putvande。我几分钟前就测试过了。我想我必须避免问困倦的问题。
//FILTER BY ATTRIBUTE NAME -------------------
var filteredByLocation:XMLList = destinations.destination.(@location != "japan");
trace("Attribute Name: "+filteredByLocation);