I have an xml file that I'm binding to a tree control as a result of 
an httpService call. I'm having a hard time understanding why if my 
xml is like this:

<grandParent label="grandParent">
 <parent label="parent">
  <child label="sister">Jane</child>
  <child label="brother">Tarzan</child>
 </parent>
</grandParent>

   In the tree control it shows parent as a folder, cool. But it also 
shows sister & brother as folders with Jane & Tarzan as files in that 
folder. They are the root level nodes, why are they represented as 
folders with thier data as children.

Anyway to fix this I figured I'd write a function to add the nodes to 
the tree by giving it a label that I want and the data that I need. 
But it's not working:

        function getNameValuePairs(event:Object) 
        {
                <!-- Need to concatenate the lable with the firstChild 
node value -->
                var aLabel
                var aDataItem
                
                for( i in event.result)
                {

                        aLable = i.target.selectedItem
[i].attributes.label;
                        aDataItem = i.target.selectedItem
[i].firstChild.nodeValue;
                        myTree.addTreeNode(aLable, aDataItem);
                
                }
        }







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to