RE: [flexcoders] Filtering descendant XML nodes based on multiple tag names

2008-04-19 Thread westmeadboy
I tried that but with no success. If I do: topElement.descendants().(hasOwnProperty(@id)); Then I get a long XMLList. But if I do: topElement.descendants().(hasOwnProperty(localName)); Then I get an empty XMLList. I looked at the ECMA spec and they talk about accessing any property using

RE: [flexcoders] Filtering descendant XML nodes based on multiple tag names

2008-04-19 Thread westmeadboy
Thanks very much - works perfectly. Tracy Spratt wrote: Almost all properties ain e4x are implemented as methods. So you want localName(). Try: topElement.descendants.(localName() ==X || localName() == Y) ; Tracy -- View this message in context:

[flexcoders] Filtering descendant XML nodes based on multiple tag names

2008-04-18 Thread westmeadboy
I would like to get all descendants having a tag name of either X or Y. Can this be done in one nice expression? I want something like this: topElement..(X|Y) or topElement..(localName == X || localName == Y) But neither of those seem to work. At the moment I have to do topElement..* and then

RE: [flexcoders] Filtering descendant XML nodes based on multiple tag names

2008-04-18 Thread Jim Hayes
want to check that as well. -Original Message- From: flexcoders@yahoogroups.com on behalf of westmeadboy Sent: Fri 18/04/2008 07:50 To: flexcoders@yahoogroups.com Subject: [flexcoders] Filtering descendant XML nodes based on multiple tag names I would like to get all descendants having

RE: [flexcoders] Filtering descendant XML nodes based on multiple tag names

2008-04-18 Thread Tracy Spratt
, April 18, 2008 8:31 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Filtering descendant XML nodes based on multiple tag names Have you tried topElement.descendants().(localName ==X || localName == Y) ? Not able to check the exact syntax on that just now (is localName an attribute

RE: [flexcoders] Filtering descendant XML nodes based on multiple tag names

2008-04-18 Thread Gordon Smith
: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Friday, April 18, 2008 2:18 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Filtering descendant XML nodes based on multiple tag names Almost all properties ain e4x are implemented as methods. So you