jduawa
asked on
Results from HTTPService call to XMLList
I am trying to take the results (xml format) from an HTTPService call and create an XMLList from it so I can create an XMLListCollection from that to use to populate a tree component. The tree component I am using has a custom built itemRenderer to put checkboxes to the left of the tree item. But i keep getting an error when tryiong to convert to XMLList. here is a portion of the code that handles the result from the httpservice
public function handleLocations(event:ResultEvent):void{
this.t.text=event.result.top.toString();
folderList = event.result.top as XMLList;
folderCollection = new XMLListCollection(folderList);
checkTree.dataProvider = folderCollection;
}
Can you put forward what is returned from the HTTPService request?
ASKER
here is a portion of the XML that is generated by the http request
<?xml version="1.0" encoding="UTF-8" ?>
<top>
<cl_state state="unchecked" label="Alabama" isBranch="true">
<cl_city state="unchecked" isBranch="false" label="AUBURN" data="auburn" />
<cl_city state="unchecked" isBranch="false" label="TUSCALOOSA" data="tuscaloosa" />
<cl_city state="unchecked" isBranch="false" label="MONTGOMERY" data="montgomery" />
<cl_city state="unchecked" isBranch="false" label="MOBILE" data="mobile" />
<cl_city state="unchecked" isBranch="false" label="HUNTSVILLE" data="huntsville" />
<cl_city state="unchecked" isBranch="false" label="BIRMINGHAM, AL" data="bham" />
</cl_state>
<cl_state state="unchecked" label="Alaska" isBranch="true">
<cl_city state="unchecked" isBranch="false" label="ALASKA" data="anchorage" />
</cl_state>
<cl_state state="unchecked" label="Arizona" isBranch="true">
<cl_city state="unchecked" isBranch="false" label="YUMA" data="yuma" />
<cl_city state="unchecked" isBranch="false" label="PHOENIX" data="phoenix" />
<cl_city state="unchecked" isBranch="false" label="PRESCOTT" data="prescott" />
<cl_city state="unchecked" isBranch="false" label="FLAGSTAFF / SEDONA" data="flagstaff" />
<cl_city state="unchecked" isBranch="false" label="TUCSON" data="tucson" />
</cl_state>
...
</top>
ASKER
I am using the checktreerenederer from here, at least trying to
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=545&productId=2
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=545&productId=2
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.