【问题标题】:How To Access Namespace Elements In MXML Using Actionscript如何使用 Actionscript 访问 MXML 中的命名空间元素
【发布时间】:2010-06-10 23:37:37
【问题描述】:

在动作脚本中...

如果我有一个等于这个的 XML 变量:

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()"/>");

我尝试通过以下方式列出属性:

var AList:XMList=X.attributes();

三个命名空间“xmlns:mx”、“xmlns:ns1”和“xmlns:ns3”不在属性中!如何以编程方式访问这些信息?

【问题讨论】:

    标签: xml apache-flex actionscript-3 actionscript mxml


    【解决方案1】:

    您可以使用 XML 类的 namespaceDeclarations 方法列出命名空间声明。

    【讨论】:

      猜你喜欢
      • 2012-10-03
      • 2023-03-13
      • 2018-01-06
      • 1970-01-01
      • 2013-10-18
      • 1970-01-01
      • 2013-01-14
      相关资源
      最近更新 更多