2 Replies Latest reply on Sep 11, 2006 11:59 PM by yoyesman

    Creating tree from HTTPService

      Hi, I'm new under flex builder and I have a simple (?) problem :

      I would like to generate a tree from a XML file generate by PHP. I can display items (source) in tree but not subitems (playlist)...

      Here my XML file generated by PHP :

      <?xml version="1.0" encoding="ISO-8859-1"?>
      <source id="3" nom="WarholinDaMix">
      <playlist id="0" nom="Tous les fichiers"></playlist>
      <source id="2" nom="YoyesGirl">
      <playlist id="0" nom="Tous les fichiers"></playlist>
      <playlist id="2" nom="Yo la liste Girly"></playlist>
      <source id="1" nom="Yoyesman">
      <playlist id="0" nom="Tous les fichiers"></playlist>
      <playlist id="1" nom="Yo ma liste 1"></playlist>
      <playlist id="3" nom="Yo ma liste 2"></playlist>

      Here the code I use :

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="GetSource.send(null);">
      <mx:HTTPService id="GetSource" url="" useProxy="false"/>
      <mx:Panel layout="absolute" left="10" right="10">
      <mx:Tree labelField="nom" dataProvider="{GetSource.lastResult.sourcelist.source}" width="100%" x="0" height="100%" y="0" showRoot="false"></mx:Tree>

      How I said, I have 3 items displaying the 'source' on my tree, but I can't expand them. There is no arrow on the left side. So subitems like 'playlist' are not display.

      Does anyone know why or have an idea ?
      Thanks for your help