XML is hierarchical so for-each may miss things. I always trace toXMLString of items and other temp vars to see what they really contain. It is almost always the case that I'm off one level or another.
Flex SDK Developer
Adobe Systems Inc.
<?xml version="1.0" encoding="utf-8"?>
private function filterList(event:Event):void
var input:TextInput = event.currentTarget as TextInput;
lisToFilter.dataProvider = resetDataProvider(input.text);
private function resetDataProvider(text:String = null):XMLList
if (text && text.length)
var matchRE:RegExp = new RegExp(text.split("").join("|"));
lisToFilter.dataProvider = filteredList;
filteredList = xmlToFilter..text.text();
2007-October - Financing Options For Special Assessments
In a perfect world there would be no special assessments. Every Association would adequately fund for the future and the upcoming major projects would be paid for out of
text="Type numbers 0, 1 or 2, or any combination to filter the list below"
Thank you for the help !!!
It turns out after reading your code I was able to make a simple tweak to my code to get things to work.
I was trying to update tempStr with anItemValue.viewentries.entrydata.text . . .
So I changed the code below to loop through the entrydata nodes and now I'm able to fetch anItemValue.text
To be honest, I still don't get why this works and my original code doesn't. I guess I'm an XML dork . Everytime I have to deal with XML I struggle for hours trying to figure this out.
Thanks for the help!!!!!!
private function filterRoutine( items : Object ) : Boolean
for each( var anItemValue : XML in items.entrydata )
if( anItemValue != null )
var tempStr : String = anItemValue.text;
if( tempStr.match( new RegExp( searchField.text, 'i' ) ) )
Well, that's because your collection was populated with <text/> nodes, not the top-level nodes which you originally wanted to access.
Glad to be of any help
You can shorten your find function to be like this: You can address the value you want by index or by shortcut of ..