Accessing Attributes and Elements Whose Names Contain Reserved Characters : Attributes : XML Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » XML » Attributes »

 

Accessing Attributes and Elements Whose Names Contain Reserved Characters


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var saleEndsDate:XML = <DATE TIME-ZONE="PST">12006</DATE>
        //trace(saleEndsDate.@TIME-ZONE);              
        trace(saleEndsDate.attribute("TIME-ZONE"));  
        trace(saleEndsDate.@["TIME-ZONE"]);          

    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo XML
» Attributes