Simple E4X Example with RegEx (Flex)
Posted by admin on May 9, 2009
Michael Fitchett, who runs the Fitchett blog, has posted a simple but very educational Flex example, showing how to display XML data from an RSS feed in a datagrid, using E4X as the resultFormat.
What’s so amazing (to me) is that :
- It is simple
- It works
- It shows you ho the E4X syntax works
- It does some extra stuff on top of that
- Michael Fitchett is providing the source code for all of that
The majority of experienced Flex developers agree that E4X is the best format to work with XML data in Flex. Unfortunately, if you’re trying to find code examples of how to make that work, you can spend hours on end to find what you’re looking for. And even then, all you get are random snippets with partial solutions.
Thanks to Michael, I was able to finish a personal project (trying to learn how to work with E4X so that I’m prepared when I take on actual XML projects in the future). In the end, it was all about making a couple of syntax changes . . . and magically, everything began to work.
However, unlike some of the people I sometimes work with, I would never say, “Oh, was that all?”*
I am very grateful for the example and the inspiration.
*Have you ever worked on somebody’s computer to fix an annoyance? Or look at someone else’s code to get them over a hump that was causing work to be delayed? By the time they call you, it’s already been hours or a day since they last did anything productive. Then you come by and look at the problem, try a few things, and POOF, it works. After that, they just shrug their shoulders and say something like, “Oh was that all? I could have done that.”
Filed Under: Applications and Software Tools, Web Design and Development
