[flexcoders] expected behaviour? (e4x)

2007-10-23 Thread nwebb
Hi, Could someone run this code and let me know whether it is expected behaviour? The snippet of code (below) is looking for xml nodes which match a certain criteria - it then pops them in an XMLListCollection. I have no problem finding the nodes and populating the collection. However, on the sec

Re: [flexcoders] expected behaviour? (e4x)

2007-10-23 Thread Tom Chiverton
On Tuesday 23 Oct 2007, [EMAIL PROTECTED] wrote: > var keywords:XMLList = theNode.country; >                         var numMatches:uint = > keywords.(text()==countryString).length(); Why do you do this and not nodesMatch=myTestData.node.country.(text()==countryString) (or similar, not tested tha

Re: [flexcoders] expected behaviour? (e4x)

2007-10-24 Thread nwebb
Hi Tom, I don't want a list of countries, I want the entire node if it contains a particular country value (the node may contain multiple county values) Eg of XML (if the user searches for any of the three countries this node should be returned): AAA Peru Kenya Istanbul I was hopi

Re: [flexcoders] expected behaviour? (e4x)

2007-10-24 Thread Tom Chiverton
On Wednesday 24 Oct 2007, [EMAIL PROTECTED] wrote: > Eg of XML (if the user searches for any of the three countries this node > should be returned): You can't return that, as it's not in the original document. I guess that explains your loop. As it's all your app, why not refactor so you can work

Re: [flexcoders] expected behaviour? (e4x)

2007-10-24 Thread nwebb
Hi Tom, I can return it - that's what I was doing (despite benefiting from a quick refactor*) However, this is a little off-topic, as getting the data and having a fix for the problem were already taken care of before I posted. >why not refactor so you can work with the document Really all I was