2 Replies Latest reply on Apr 3, 2007 6:27 AM by romanczar

    Populate Combobox with nested XML

    romanczar Level 1
      Hi!
      How can I populate a ComboBox with an XML retrieved via an HTTPService?

      My XML Looks like

      <?xml version="1.0" encoding="iso-8859-1"?>
      <xml>
      <node label="1" value="a" />
      <node label="2" value="b" >
      <node label="21" value="ba" />
      <node label="22" value="bb" />
      <node label="23" value="bc" />
      </node>
      <node label="3" value="c" />
      <node label="4" value="d" />
      <node label="5" value="e" />
      </xml>

      The desired output in the combobox would be

      a
      b
      -- ba
      -- bb
      -- bc
      c
      d
      e

      <mx:ComboBox id="selectedLevel" dataProvider="{structure}" labelField="label" />

      "structure" is an XMLListcollection, my Resulthandler looks like

      structure = new XMLListCollection(event.result.node);


      Can someone give me a hint what is missing?