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

Reply via email to