Click here to Skip to main content
15,894,106 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want label of button as a xml taf name for example

xml:

XML
<TestStation>
        <Number>1</Number>
        <Operator>Bob</Operator>
        <Department>Temperature Testing</Department>
    </TestStation>



i want button label name as TestStation or Number etc as the tags are descibed.
Posted

1 solution

<windowedapplication xmlns="http://ns.adobe.com/mxml/2009"> <Script> <node2a><node3><node4><node2b>; public function myLabelFunction(item:Object):String { var node:XML = XML(item); var nodeName:QName = node.name(); return nodeName.localName; } ]]> </Script> <tree width="100%" dataprovider="{xml}" labelfunction="myLabelFunction">
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900