开发者

AS3 - Get an XMLList using a variable

I have the following XMLList and am trying to return the XMLList with the node having the label Mail Box or Outbox, depending on string variable called folder. folder can either be equal to "Mail Box" or "Outbox".

    `<fx:XMLLis开发者_C百科t id="treeData">
        <node label="Mail Box">
            <node label="Inbox">
                <node label="Marketing"/>
                <node label="Product Management"/>
                <node label="Personal"/>
            </node>
            <node label="Outbox">
                <node label="Professional"/>
                <node label="Personal"/>
            </node>
        </node>    
    </fx:XMLList>`

How can I return the XMLList? For instance, can I do something like var xmlList : XMLList = treeData.node.@label==folder;?


You almost got it:

treeData.node.(@label==folder)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜