tags:

views:

16

answers:

1

Hello, i have a HTTPService providing XML on request.

<mx:HTTPService id="selektProdukt_data" url="{l_url_selektProduktservice}" useProxy="false" resultFormat="e4x"/>

so invokink the service with:

selektProdukt_data.send();

delivers resulting XML

<?xml version="1.0" encoding="UTF-8"?>
<result>
  <error_text>OK</error_text>
  <node label="Alte As">
     <node label="Single Play">
        <node label="PMx">
          <node label="Variante-B"/>
        </node>
     </node>
  </node>
</result>

But my tree won't get populated:

<mx:Tree id="selectTree" dataProvider="{selektProdukt_data.lastResult.struktur}" labelField="@label" showRoot="false"/>

It should show:

Alte AS  
|_SinglePlay  
  |_PMx  
    |_Variante-B  

What am I missing?

A: 

There is no such thing as struktur in the xml you posted - change the tree code to:

<mx:Tree id="selectTree" 
    dataProvider="{selektProdukt_data.lastResult.node}" 
        labelField="@label" showRoot="false"/>

I believe this wouldn't show Alte As, the root tag. Set showRoot="true" to show that.

Amarghosh