So in the following code, why doesn't it find the node containing "The
Dark Knight"?  Yet, if I switch out "Dark" in the RegExp argument for
"The", it indeed finds all the nodes that have "The" in it.  If I again,
switch out the word, "Violet", then nothing gets returned.  If I put
"Of", then it returns the two nodes that contain "Of".  The only logic I
have been able to find is that this only works if MORE THAN  ONE node
contains the search term.  Something to do with XMLList or the
regex.test method.  Ideas? 

var testXML:XML = <data>
                <topic title="Coldplay's New Album, Viva La Vida Or
Death And All His Friends" />
                <topic title="The Dark Knight" />
                <topic title="Arrested Development, The Movie" />
                <topic title="Band Of Horses: Everything All The Time"
                <topic title="Master And Commander: The Far Side Of The
World" />
                <topic title="The Quick Brown Fox Jumped Over The Lazy
Dog" />
                <topic title="Violet Hill" />

var re:RegExp = new RegExp("Dark", "i");

var xmlListSearch:XMLList = testXML.topics.topic.(

trace("result: "+xmlListSearch.toString());

Jason Merrill 
Bank of America 
Enterprise Technology & Global Risk L&LD 
Instructional Technology & Media

Join the Bank of America Flash Platform Developer Community 

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  GT&O Innovative Learning Blog & subscribe. 

Flashcoders mailing list

Reply via email to