Use the namespaceDelarations() method to return an Array of all the namespaces defined for a given element.
package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ var example:XML = <example xmlns:test="http://foo.com/" xmlns:mims="http://A.com/" xmlns:roger="http://B.com/" />; trace(example.namespaceDeclarations()[1]); } } }