Menu:

Sponsor

Discover Master of Alchemy, our first iPad/iPhone and iPod touch game!

Follow Me

 

Forum's topics

Latest Files

Archives

Top Rated

Categories

Photo Gallery


Alessandro Crugnola on July 12, 2006 in actionscript

E4X, ActionScript 3 new "sublanguage"

Since I've heard the voices about the upcoming E4x in actionscript 3 I awaited this moment...
Finally ActionScript supports E4X and we can kick away the old XML object (always supported for backward compatibility)! we can stop using all the various xml2object classes created in these years, we finally have a validating parser, so we will see finally well formatted XML files from flash users :)
But finally we have a powerful "language" with a very strong syntax.

I've written a small tutorial with a quick guide  about actionscript3 and e4x basic syntax (without including Namespaces and QNames for the moment)

http://www.sephiroth.it/tutorials/flashPHP/E4X/index.php 

P.s. I forgot to say that E4X is also available in the Geko1.8 browser (such as Firefox 1.5). For more info see this article: http://developer.mozilla.org/en/docs/E4X. Unfortunately E4X ins't supported by python, neither there's a module for it :(

 

Bookmark and Share

 

Tags: e4x , tutorial , xml 

 

3 comments
This is not related with the post...but this stands as a way to share with you my happiness for having gained my bachelor in economics from university finally!
function onComplete(evt:Event) {
mainXML = new XML(loader.data)
var match:String = "fk@alex.com"
trace(mainXML..item.(author.@email == match)..name.text());
}
How can I access: mainXML..item.(author.@email=="fk@alex.com")..name.text() if "fk@alex.com" is a variable... mainXML..item.(author.@email==$flashvar)..name.text() ???


Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Type the characters you see in the picture above.





 

TrackBacks

TrackBack URL for this entry: http://www.sephiroth.it/cgi-bin/mt/mt-tb.cgi/119