Working with XML in Flex or AIR can sometimes be very painfull if you mess with namespaces.
I just spent few hours figuring how to solve the «VerifyError» puzzle:
VerifyError: Error #1025: An invalid register 1 was accessed.
VerifyError: Error #1025: An invalid register 2 was accessed.
VerifyError: Error #1025: An invalid register 3 was accessed.
VerifyError: Error #1025: An invalid register 4 was accessed.
VerifyError: Error #1025: An invalid register 5 was accessed.
I was loading some fancy XML spitted by REST backend and had to set the default xml namespace in a function scope in order to access it:
default xml namespace = xml.namespace();
Don’t ask me why, but you have to «reset it» when you finish manipulating the XML otherwise you wont be able to call functions in the same scope:
default xml namespace = new Namespace( "" );

Zoidberg: Why? Why? Why?
I hope that helps

Thanks dude, your posting just saved me.
Thanks for posting this, Adnan! I *never* would have guessed that I had to “reset” the default namespace before making a call to a static function.
Much appreciated!
Yes, it seems that the XML namespace affects more then it should
THANK YOU!!! Like Taylor, I NEVER would have figured that out. Keep your reports coming.
Thanks! Saved my day
thx a lot you saved me big time!
Ran in the same issue today while manipulating an update.xml for an AIR application. Thanks for posting it!
-Jens
Wow, I am still quite confused with XML namespace as it does seem to have side-effects that I can’t get my mind around. I found that the following expressions did NOT work only AFTER a default namespace directive was declared:
_key.@id >> works
_key.@["id"] >> does NOT work
_key["@id"] >> works
_key.@["id"] >> does NOT work
_key.attribute(“id”) >> does NOT work
Anyone got a good reference to what’s really happening when you use the directive?
Thanks a gazillion! What little hair I have left is now safe.
Thank you!