public class Main extends Sprite{ public function Main(){ var fruits:XML = <fruits> <fruit color="red"> <name>Apple</name> </fruit> <fruit color="orange"> <name>Orange</name> </fruit> <fruit color="green"> <name>Pear</name> </fruit> <fruit color="red"> <name>Watermelon</name> </fruit> </fruits>;
trace( fruits.fruit.(name == "Apple").@color );
} } }
Related Scripts with Example Source Code in same category :