example.normalize(); : normalize « XML « Flash / Flex / ActionScript






example.normalize();

 

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

        var example:XML = <stooges>
                             <moe /><curly><larry>
            </larry>
                                   </curly>
                   </stooges>;
        
        trace(example.text().length()); // Displays : 1
        trace(example.text().toXMLString()); // Displays: shemp
         

    }
  }
}

        








Related examples in the same category

1.Normalizing Text Nodes