Re: [Flashcoders] xml and e4x searching question

2009-02-20 Thread Kenneth Kawamoto
If you want to find the EMPLOYEE node you can do something like: trace(staff2.EMPLOYEE.(text()[0] == "leroy").toXMLString()); trace(staff2.EMPLOYEE.(child(0) == "leroy").toXMLString()); trace(staff2.EMPLOYEE.(toString() == "leroy").toXMLString()); Kenneth Kawamoto http://www.materiaprima.co.uk/

Re: [Flashcoders] xml and e4x searching question

2009-02-19 Thread Taka Kojima
When you trace out: trace(staff.*.(POSITION == "Designer")); You will see that it returns the parent element... So, even if your code were to work, all it would do would be to return the root node, which probably wouldn't help you. If you compare the two examples, you will see that there is on

[Flashcoders] xml and e4x searching question

2009-02-19 Thread Ferd Berfel
hello, newbie here... I'm trying to understand searching xml with e4x why does this work: var staff:XML = Marco Crawley James Crawley Designer var results:XMLList= staff.*.(POSITION == "Designer") and this does not? var staff2:X