actionscript 3 - AS3 Flash CS5 - XML node filters? -
i did find piece of code (slightly edited):
var destinations:xml = <destinations> <destination location="japan"> <exchangerate>400</exchangerate> <placesofinterest>samurai history</placesofinterest> </destination> <destination location="australia"> <exchangerate>140</exchangerate> <placesofinterest>surf , bbq</placesofinterest> </destination> <destination location="peru"> <exchangerate>30</exchangerate> <placesofinterest>food</placesofinterest> </destination> </destinations>; //filter attribute name ------------------- var filteredbylocation:xmllist = destinations.destination.(@location == "japan"); trace("attribute name: "+filteredbylocation); //filter node value ---------------------- var filteredbyexchangerate:xmllist = destinations.destination.(exchangerate < 200); trace("node value: "+filteredbyexchangerate);
i'd know if it's possible opposite. mean, not node attribute name.
thanks in advance help.
i sleepy:
//filter attribute name ------------------- var filteredbylocation:xmllist = destinations.destination.(@location != "japan"); trace("attribute name: "+filteredbylocation);
anyway, can useful there.
Comments
Post a Comment