Information AboutE4x |
| CATEGORIES ABOUT E4X | |
| xml | |
|
E4X is standardized by Ecma International in the ECMA-357 standard . The first edition was published in June 2004, the second edition in December 2005. var sales = <sales vendor="John"> <item type="peas" price="4" quantity="6"/> <item type="carrot" price="3" quantity="10"/> <item type="chips" price="5" quantity="3"/> </sales>; alert( sales.item.(@type == "carrot").@quantity ); alert( sales.@vendor ); for each( var price in sales..@price ) { alert( price ); } IMPLEMENTATIONS The first implementation of E4X was designed by Terry Lucas and John Schneider and appeared in BEA 's Weblogic Workshop 7.0 released in February 2002. BEA's implementation was based on Rhino and released before the ECMAScript E4X spec was completed in June 2004. John Schneider wrote an article on the XML extensions in BEA's Workshop at the time. The reference documentation for this pre-E4X language is still available . E4X is implemented in SpiderMonkey ( Gecko 's JavaScript engine) and in Rhino (Mozilla's other JavaScript engine written in Java instead of C). As Mozilla Firefox is based on Gecko, it can be used to run scripts using E4X. The specification is supported in the 1.5 release or later. Note: To correctly run a script using Firefox 1.5 "; e4x=1" must be appended to the end of the script ''type'' attribute (e.g. ). Adobe's ActionScript 3 scripting language fully supports E4X. Early previews of ActionScript 3 were first made available in late 2005. Adobe officially released the language with Flash Player 9 on June 28, 2006. E4X is also available in Adobe AIR and Adobe Flex as both products use ActionScript 3 as a scripting language. RESOURCES
|
|
|