text( ) method should be used to return only the text nodes of an element : Data type : XML Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » XML » Data type »

 

text( ) method should be used to return only the text nodes of an element


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){

        var fruit:XML = <fruit>
                            <name>Apple</name>
                            An apple a day...
                          </fruit>;
        
        for each var textNode:XML in fruit.text(  ) ) {
          tracetextNode );    
        }
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo XML
» Data type