Below is output from my code that represents the elements in an 
XMLList. I'm wanting to determine if the stream contains a <cpData> 
tag (this one does, not all do) and am having trouble doing so via 
the code attached. Can someone point out my error when using 
XMLList.contains()? I've tried contains with "cpData", "<cpData>", 
etc.. and nothing seems to work.

item: <intconn dataValue=" " severity="0"/>
item: <domconn dataValue=" " severity="0"/>
item: <cpData>
  <crewData arrivalStatus="I" crewCount="1" fromDepSta="TUL" 
fromFlightNumber="0710" latestArrivalTime="200607190855"/>
  <crewData crewCount="1" fromFlightNumber="ORIG"/>
</cpData>
item: <inboundintconn dataValue=" " severity="0"/>
item: <inbounddomconn dataValue=" " severity="0"/>
item: <inboundarvgate dataValue="C12" severity="0"/>


public function generateCPMouseOver(data:Object, 
myListData:DataGridListData):String {
var xmlData:XML = XML(data);
var elems:XMLList = xmlData.elements();
var item:XML;
                
var found:Boolean = false;
for each(item in elems) {
   trace("item: " + item.toXMLString());
   if (item.contains("<cpData>")) found=true;
}
return found.toString();
}





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to