var xmlResult:XML = XML(event.result); devicesList = xmlResult.device.(attribute("id") != "pool");
trace(devicesList.toXMLString()); devicesCollection = new XMLListCollection(devicesList); Tracy ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of anuj181 Sent: Tuesday, November 18, 2008 5:34 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Filtering data using HTTP Hi Guys I am getting data in list box. I am using HTTP Service for getting all the entries and I filtered my list with the entries having the node named as 'pool'. My question is how would i get all the entries in the list except the entries with the pool in the list. Basically i have all the data and the list having the data with id as 'pool', All i need is all the entries from my data without id 'pool'. Below is my code for getting entries for the pool name. Please let me know if anyone has any idea. Thanks Anuj /*Code*/ <mx:HTTPService id="devicesXML" method="GET" resultFormat="e4x" url="http://10.50.5.47:8182/config/devices <http://10.50.5.47:8182/config/devices> " result="devicesXMLHandler(event)" showBusyCursor="true"> private function devicesXMLHandler(event:ResultEvent):void { devicesList = event.result.device; devicesCollection = new XMLListCollection(devicesList); //Checks every device for each (var devicesInPool:* in devicesList) { var deviceName:String = [EMAIL PROTECTED]; devicesInList.push(deviceName); var devicesText:XMLList = devicesInPool.child("attributes").child("attribute"); //Checks every attribute tag for each device for each (var attributesInPool:* in devicesText) { //Checks if the attribute name is pool if([EMAIL PROTECTED] == 'pool') { //Sets a variable to equal the name of the pool var poolnameText:String = attributesInPool.toString(); //Checks if the pool name matches devices in the current pool if(poolnameText == poolsCollection.attributes().toString()) { cameraPoolList.push(deviceName); } } } }