E4X

I am quite sure the majority of readers who are Flash Platform Developers are familiar with parsing XML documents in ActionScript 2.0. And though it is fun to do and most of us already have plenty of AS 2.0 parsing utilities such as XMLSA, in reality it is quite cumbersome to say the least.

Welcome to E4X, quite simply ECMAScript for XML (E4X), and in my opinion this is the what has been needed all along. I have written many APIs which convert XML objects to strongly type data structures, similar in some ways to how mxml is converted to native ActionScript objects at compiletime in Flex. This may be appropriate for certain applications but when it comes to just parsing a document E4X makes much more since. What E4X does is incredibly simple and logical. Since the XML document is contained inside an XML object you then have access to all of it’s properties, which are nothing more than the documents nodes, attributes, namespaces etc.

ActionScript 3.0 will have support for this new standard which we can take advantage of without having to worry about the limitations of most browsers at the moment since none of the mainstream browsers are currently supporting E4X. Check out www.ecma-international.org to learn more.

{ 1 comment to read ... please submit second! }

{ 0 Pingbacks/Trackbacks }