用你的例子跑了一下,没问题啊,输出的tmp完全正确。private var myXML:XML = ; protected function button1_clickHandler(event:MouseEvent):void { trace(myXML..node.(@selected=='1')); }