PDA

View Full Version : [AS3] How to populate comboBox and List from XML


secret007
03-11-2009, 12:15 PM
Hi, i have an xml file below,

<root>

<sport name="soccer">


<tournament name="Doing league FA Cup"> india-pak 3-2,eng-aus 2-1,zmb-bng 2-2 </tournament>


<tournament name="Tournament B"> west-new 1-2,holl-kenya 2-3,eng-aus 3-3 </tournament>


<tournament name="Tournament C"> ind-new 1-2,holl-kenya 2-3,pak-aus 3-3 </tournament>




</sport>


<sport name="cricket">


<tournament name="Doing league FA Cup"> india-pak 3-2,eng-aus 2-1,zmb-bng 2-2 </tournament>


<tournament name="Tournament B"> west-new 1-2,holl-kenya 2-3,eng-aus 3-3 </tournament>


<tournament name="Tournament C"> ind-new 1-2,holl-kenya 2-3,pak-aus 3-3 </tournament>




</sport>


</root>


and i want to populate my comboBox named sports_cmb with the sports names only there are two in this case, and i want to populate my second comboBox name tournaments_cmb with the tournaments names of the respective sports , and when anyone select one of the tournament the respective team names and there score will be shown in the list component

plz help me out .. thanks in advance....