AMFPHP - Returning XML Data

7 views
Skip to first unread message

Kiran Kumar Vasireddy

unread,
Dec 30, 2009, 1:56:02 PM12/30/09
to Flex India Community
Dear All,

I am returning XML string from PHP. It is just Static String .Format is below .

<record><Company name="abc" /><Company name="bcd" /><Company name="efg" /></record>

In flex I am converting into   XMList using :-       new XMLList(event.result as String)

and assigning it to Combox

<mx:ComboBox id="IDSub" dataProvider="{abc1}" labelField="@name"/

But this is not working . As per my understanding it should not consider root element and should populate the combobox.

If I send the XML in the below formatted String it is working fine

<Company name="abc" /><Company name="bcd" /><Company name="efg" />

Can some body explain me why ?

Regards
Kiran

kosal bhati

unread,
Dec 30, 2009, 11:55:55 PM12/30/09
to flex_...@googlegroups.com
hey
dude...........flex.........

do 1 thing......
 <mx:XML id="tempXML"
            source="assets/your xml file.xml" />

<mx:XMLListCollection id="cuePointXMLList"
            source="{tempXML.your root folder}" />
<mx:ComboBox id="IDSub" dataProvider="{cuePointXMLList}" labelField="@name"/>

do this.......it will work fine..............your u can contact me.........

Reply all
Reply to author
Forward
0 new messages