How do I select a certain node in a tree in flex?

放肆的年华 提交于 2019-12-24 16:29:16

问题


I'm trying to get properties for one single node such as the name I've set for it or something. How can I go by just selecting this one node? I can do it with an event

e.currentTarget.selectedItem.@name;

But I need to grab it without the event, how can I go by doing this?


回答1:


it's better to get data from your data provider for xmlTree, because it's a XML/XMLList you can always use construction like

myxml.nodename[0].@attribute



来源:https://stackoverflow.com/questions/4796462/how-do-i-select-a-certain-node-in-a-tree-in-flex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!