the following works fine for me:

var artData:XML = <art>
<bios>
 <artistBio f="Victor" s="Pasmore">blah blah</artistBio>
 <artistBio f="Stephen" s="Pentak">more blah blah</artistBio>
</bios>
</art>;

var lastName:String = "Pentak";
var firstName:String = "Stephen";

var allBios:XMLList = artData.bios..artistBio;

var thisone:XMLList = allBios.((@s==lastName)&&(@f==firstName));

trace(thisone.toXMLString());


----- Original Message ----- From: "Mendelsohn, Michael" <[email protected]>
To: "Flash Coders List" <[email protected]>
Sent: Wednesday, February 17, 2010 10:26 PM
Subject: [Flashcoders] E4X, it's STILL just not my day.


Hi list...

Why can't I get to the node I want to here:

<art>
<bios>
<artistBio f="Victor" s="Pasmore">blah blah</artistBio>
<artistBio f="Stephen" s="Pentak">more blah blah</artistBio>
</bios>
</art>

var artData:XML represents the above correctly.

var lastName:String = "Pentak";
var firstName:String = "Stephen";


// successfully lists out all the <artistBio> tags
var allBios:XMLList = artData.bios..artistBio;

// thisone is null...why??  Aren't I filtering it correctly?
var thisone:XMLList = artData.bios..artistBio.((@s==lastName)&&(@f==firstName));

Thanks, perplexed, E4x shouldn't be this weird...
- Michael M.

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to