Tracy, You are wrong on that remark, if you do valueOf()....@attributename, then you are safe. This is because E4X-specific opcodes act like with() construction, i.e. they just push the current XML node context in front of every other context in the context lookup chain. While XML class is dynamic, it is OK to try to access a non-existent property on it, however, the context lookup behavior verifies for the property existence, and if the property doesn't exist, it advances to the next link in the chain - to function arguments -> function local variables -> class fields -> open namespaces -> global context. Global context is not dynamic, and it is difficult to believe that some of the scopes will happen to be a Proxy subclass which implements getProperty() + isAttribute(). So, the error you are talking about is caused by that while resolving scope the VM will hit an instance of the sealed class object, which will cause it to throw NPE. But, if you limit the scope lookup to only the context of XML node - that is by calling it on valueOf(), you will not traverse the scopes chain - thus no NPE, you'll get empty-string, which is the default XMLList behavior for converting a null-XMLList.
So, it is safe to do: <foo/>.(trace( valueOf()....@bar ) ); but it is not safe to do: <foo/>.(trace( @bar ) ); Best. Oleg

