Accessing Attributes and Elements Whose Names Contain Reserved Characters: attribute( ), child( ), or [] operator.
package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var saleEndsDate:XML = <DATE TIME-ZONE="PST">1, 2006</DATE>
//trace(saleEndsDate.@TIME-ZONE);
trace(saleEndsDate.attribute("TIME-ZONE"));
trace(saleEndsDate.@["TIME-ZONE"]);
}
}
}
Related examples in the same category