title: Flex Tree Custom Tree View
body: <p>I have an xml string fetched as a remote object like:  </p>
  
  <pre><code>&lt;metadata&gt;  
    &lt;system name="A"&gt;  
      &lt;serviceGroup name="SG1"&gt;  
        &lt;version id="id1" /&gt;  
        &lt;service name="S1"/&gt;  
      &lt;/serviceGroup&gt;  
      &lt;serviceGroup name="SG2"&gt;  
        &lt;version id="id2" /&gt;  
        &lt;serviceGroup name="SG3"&gt;  
          &lt;version id="id3" /&gt;  
          &lt;service name="S2"/&gt;  
        &lt;/serviceGroup&gt;  
      &lt;/serviceGroup&gt;  
    &lt;/system&gt;  
  .
  .
  .
  .
  &lt;/metadata&gt;
  </code></pre>
  
  <p>As the xml sample shows, this contains nested servicegroups.
  I have to display all the services,and the servicegroups.
  And ignore everything else..eg. the version
  The services viz. S1 and S2 should be leaf nodes, everything else must be a parent</p>
  
  <p>E.g.<br>
  ->A<br>
  --->SG1<br>
  ------>S1<br>
  ---->SG2<br>
  ------>SG3<br>
  --------->S2<br>
  .<br>
  .<br>
  .  </p>
  
  <p>I tried all kind of things, like using labelFunctions, labelField properties with Tree but it doesn't help. I always end up with un-labelled leaves.</p>
  
  <p>I think I can do this with a ITreeDataDescriptor but not sure how.
  I am a flex beginner and the <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=about_dataproviders_6.html" rel="nofollow noreferrer">adobe sample</a> didn't help too much ..</p>
  
  <p>I think the above tutorial is far too complex for a beginner.
  Would really appreciate if someone can point me to something simpler.</p>
  
  <p>Thanks,
  Sandeep</p>