Did you try this: var topic:XML = topicData[0]; // gets the below xml, came from an xmllist var wording:String = "Presentation"; var assets:XMLList = topicData[0]..asset; trace(assets.(@title == wording));
-- Warm Regards Deepanjan Das W: http://deepanjandas.wordpress.com || Om Manasamarthadata Shri Aniruddhaya Namah || *"Think of the environment before printing this email"* On Thu, Nov 18, 2010 at 12:19 AM, Mendelsohn, Michael < michael.mendels...@fmglobal.com> wrote: > Hi list... > > I have an E4X statement that breaks when I add a filter to it to get a > specific node. I keep getting null when I include hasOwnProperty() to the > statement. > > // I want to get "giraffe.ppt" or <asset title="Presentation" > fileName="giraffe.ppt"/> > var topic:XML = topicData[0]; // gets the below xml, came from an xmllist > var wording:String = "Presentation"; > // I get an xmllist for this: > var assets:XMLList = topicData[0]..asset; > // but I keep getting null returned for these: > var assets:XMLList = topicData[0]..asset.(hasOwnProperty("@title")); > var assets:XMLList = topic..asset.(hasOwnProperty("@title") && > attribute("title") == wording)....@filename; > > Why does the statement break with the E4X filter? > > Thanks...any help is appreciated, > - Michael M. > > <topic title="abc"> > <keywords>dog,cat,bird</keywords> > <description>blah blah</description> > <asset title="Presentation" fileName="giraffe.ppt"/> > <asset title="Document 1" fileName="a.mpg"/> > <asset title="Document 2" fileName="b.mpg"/> > </topic> > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders