Thank you Matt! thats worked. regrds bod
--- In [email protected], "Matt Chotin" <[EMAIL PROTECTED]> wrote: > > Sorry, my bad. XML.contains is basically an equality test. > XMLList.contains will tell you whether the item is in there. > > So if I do this it should work: xml1.children().contains (xml1.Report[0]) > > Matt > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of bhaq1972 > Sent: Monday, April 03, 2006 1:37 AM > To: [email protected] > Subject: [flexcoders] Re: Flex2B2 - XML.contains() > > Nope. Still failing the if test. > regards > bod > > --- In [email protected], "Matt Chotin" <mchotin@> wrote: > > > > Yes, contains is by reference, so it doesn't recognize your inline > > definition as being the same as what's in the XML object. > > > > So this would work: > > > > var test:XML = xml1.Report[0]; > > if (xml1.contains(test)) > > { > > trace('found'); > > } > > > > > > Matt > > > > -----Original Message----- > > From: [email protected] > [mailto:[EMAIL PROTECTED] On > > Behalf Of bhaq1972 > > Sent: Friday, March 31, 2006 7:31 AM > > To: [email protected] > > Subject: [flexcoders] Flex2B2 - XML.contains() > > > > Just trying out this method. the first 2 if tests are failing (not > > getting traces). is that correct? > > > > var xml1:XML = <Root> > > > <Report /> > > <Detail /> > > </Root>; > > > > if(xml1.contains(<Report />)) > > { > > trace("report found"); > > } > > if(xml1.contains(<Detail />)) > > { > > trace("detail found"); > > } > > if(!xml1.contains(<Me />)) > > { > > trace("Me not found)"; > > } > > > > > > > > > > > > -- > > 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 > > > > > > > > > -- > 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 > -- 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/

