Joshua
Joshua

Reputation: 6843

How To Access Namespace Elements In MXML Using Actionscript

In Actionscript...

If I Have an XML variable that equals this:

var X:XML=XML("<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:ns1="Tools.*" minWidth="684" minHeight="484" creationComplete="Init();" xmlns:ns3="Components.*" initialize="I()"/>");

And I try to list the attributes via:

var AList:XMList=X.attributes();

The three namespaces, "xmlns:mx","xmlns:ns1", and "xmlns:ns3" aren't listed among the attributes! How can I access this information programmatically?

Upvotes: 2

Views: 272

Answers (1)

AnthonyWJones
AnthonyWJones

Reputation: 189467

You can list the namespace declarations with the namespaceDeclarations method of the XML class.

Upvotes: 2

Related Questions