Re: [flexcoders] e4x XML question

2006-02-08 Thread Manish Jethani
On 2/8/06, thunderstumpgesatwork <[EMAIL PROTECTED]> wrote:

> x.employee.(lastName == "McGee") // nodes with lastName "McGee"
>
> I need to do this dynamically.. what if I don't know the element name
> (the 'lastName' portion above) ? How can I substitute a String
> variable for the 'lastName' ?

Try this:

 x.employee.([variable] == "McGee")


--
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/
 





[flexcoders] e4x XML question

2006-02-08 Thread thunderstumpgesatwork
Hi,

I'm trying to filter a set of nodes based on an element value. For
instance in the documentation it shows I can do this:

x.employee.(lastName == "McGee") // nodes with lastName "McGee"

I need to do this dynamically.. what if I don't know the element name
(the 'lastName' portion above) ? How can I substitute a String
variable for the 'lastName' ?

// I need something like this..
var filterField:String="lastName";  // these will be dynamic
var filterValue:String="McGee"; // these will be dynamic

x.employee.(filterField == filterValue) // this doesn't work...


I sure hope there's something relatively simple. I sure can't think of
it now!

Thanks in advance,
Thunder






--
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/