Use regular repression to filter tag value : Filter : XML Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » XML » Filter »

 

Use regular repression to filter tag value


 

package{
  import flash.display.Sprite;
  
  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>;
        tracefruits.fruit./^[aeiouAEIOU].*/.testname ) ) );

    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo XML
» Filter