tags:

views:

14

answers:

1

The following xml values is getting from php file

<result>
   <list>
      <node>air</node>
      <node>flex</node>
      <node>android</node>
   </list>
</result>

i am calling this xml using httpservice

 <mx:HTTPService 
        id="project" 
        url="http://localhost/eshpm/AIR/newproject.php"
        method="POST" result="onResult_projectname(event)" resultFormat="e4x">
            <mx:request xmlns="">
                <name>yes</name>
            </mx:request>
</mx:HTTPService>

The result is obtained using the function

private function onResult_projectname(evt:ResultEvent):void
 {

        xmldata = new XML(evt.result);
        xmlList_user = new XMLListCollection(xmldata.list);             

        tree.dataProvider = xmlList_user.children();            
 }

The problem is that i am able to display the values in Tree.......but it is repeating

ie, "air" is comming in tree twice....

plz help.............thanks

A: 

Try using <mx:Tree dataProvider="{project.lastResult.result}" labelField="node"/>. By invoking project.send() databinding works and populates your Tree.

omnibrain