I couldn’t find much information about E4X filtering on the net. The problem that I had was I had a list of people, some of which were contractors, most of which were employees. The contractors simply did not have certain attributes and I could not filter this at the web service or SQL level for one reason or another. Mostly for lack of access. I finally figured out the problem and I figure that I should just jot it down for future reference.

Here’s the xml from the event handler once it was loaded:

var result_xml:XML = XML(event.result);

Are you ready for this? This was literally all I needed to do:

var resultList:XMLList = result_xml..node..node.(attribute(‘level’).toString() != "");

The attribute call looks for all nodes that have the attribute “level”, and just checks that it’s not an empty string.

That’s pretty much it.

Popularity: 7% [?]

No related posts.