PlayScriptRedux / playscript

PlayScript is an ActionScript compatible compiler and Flash compatible runtime that runs in the Mono/.NET environment
Other
17 stars 9 forks source link

XML - Implement xml["@id"] style attribute accessor #63

Open sushihangover opened 9 years ago

sushihangover commented 9 years ago

Currently these access methods are supported:

This style is not currently supported, but is allowed in AS3:

// Compiler options: -psstrict-
package {
    public class Foo {
        public static function Main():int {
                var xml:XML=<example id='123' color='blue'/>;

                var idAttrArrayIndexer:String = xml["@id"];
                trace(idAttrArrayIndexer);
                if (idAttrArrayIndexer != "123") return 1

                return 0;
        }
    }
}