ECMAScript for XML

ECMAScript for XML (E4X) was the standard ISO/IEC 22537:2006 programming language extension that adds native XML support to ECMAScript (which includes ActionScript, JavaScript, and JScript). The goal was to provide an alternative to DOM interfaces that uses a simpler syntax for accessing XML documents. It also offered a new way of making XML visible. Before the release of E4X, XML was always accessed at an object level. E4X instead treated XML as a primitive (like characters, integers, and booleans). This implied faster access, better support, and acceptance as a building block (data structure) of a program.

E4X was standardized by Ecma International in the ECMA-357 standard. The first edition was published in June 2004, the second edition in December 2005.

The E4X standard was deprecated by the Mozilla Foundation in 2014.[1]

It was withdrawn by ISO/IEC.[2]

Browser support

E4X is supported by Mozilla's Rhino, used in OpenOffice.org and several other projects. It is also supported by Tamarin, the JavaScript engine used in the Flash virtual machine. It is not supported by other common engines like Nitro (Safari), V8 (Google Chrome), Carakan (Opera), Chakra (Internet Explorer and pre-Chromium Edge).[3]

E4X was also supported by SpiderMonkey (used in Firefox and Thunderbird), but has been removed. In Firefox 10, E4X syntax was no longer accepted in SpiderMonkey when ECMAScript 5 "strict mode" is enabled.[4] According to Brendan Eich, "This thus signals start of deprecation for E4X in SpiderMonkey."[5] and "has been disabled by default for webpages (content) in Firefox 17, disabled by default for chrome in Firefox 20, and has been removed in Firefox 21"[6]

Example

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 );
}
delete sales.item[0];
sales.item += <item type="oranges" price="4"/>;
sales.item.(@type == "oranges").@quantity = 4;

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.

  • E4X was implemented in SpiderMonkey (Gecko's JavaScript engine) since version 1.6.0[7] until version 20, and is in Rhino (Mozilla's other JavaScript engine written in Java instead of C) since version 1.6R1.[8]
  • As Mozilla Firefox is based on Gecko, older versions could be used to run scripts using E4X. But this feature is deprecated since release 16 and removed in release 18.
  • 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 available in Flash CS3, Adobe AIR and Adobe Flex as they use ActionScript 3 as a scripting language.
  • E4X is also available in Adobe Acrobat and Adobe Reader versions 8.0 or higher (notably[9] Forward Ported from SpiderMonkey version 17[10] and suggested may be dropped in the near future).
  • E4X is also available in Aptana's Jaxer Ajax application server which uses the Mozilla engine server-side.
  • Since the release of Alfresco Community Edition 2.9B, E4X is also available in this enterprise document management system.
  • E4X is available as part of Mirth Connect's JavaScript message transformation engine.

See also

  • JSX – an XML based markup specifically for DOM manipulation

References

  1. ^ "E4X – Archive of obsolete content – MDN". Mozilla. Archived from the original on 24 July 2014. Retrieved 10 September 2014.
  2. ^ "ISO/IEC 22537:2006 — Information technology — ECMAScript for XML (E4X) specification — Status : Withdrawn".
  3. ^ "Issue 30975: Implement E4X Support for scripts and extensions". Google. Retrieved 21 May 2012.
  4. ^ "Firefox 10 for developers". Mozilla. Archived from the original on 5 May 2012. Retrieved 21 May 2012.
  5. ^ "Bug 695577 – E4X syntax should not be accepted in ES5 strict mode". Mozilla. Retrieved 21 May 2012.
  6. ^ "E4X". Mozilla. Archived from the original on 30 September 2013. Retrieved 12 February 2013.
  7. ^ SpiderMonkey 1.6.0 release notes Archived 2009-04-15 at the Wayback Machine
  8. ^ Rhino 1.6R1 Change log
  9. ^ "Acrobat Help / New features summary". Retrieved 2015-07-16.
  10. ^ "15.008.20082 Planned Update, July 14, 2015". Retrieved 2015-07-16.

Read other articles:

This is the talk page for discussing improvements to the Overseas Asians template. Put new text under old text. Click here to start a new topic. New to Wikipedia? Welcome! Learn to edit; get help. Assume good faith Be polite and avoid personal attacks Be welcoming to newcomers Seek dispute resolution if needed This template does not require a rating on Wikipedia's content assessment scale.It is of interest to the following WikiProjects:Asia Asia portalThis template is within the scope of WikiPro…

لويس ممفورد (بالإنجليزية: Lewis Mumford)‏    معلومات شخصية الميلاد 19 أكتوبر 1895 [1][2][3][4][5][6][7]  فلاشينغ  [لغات أخرى]‏[8]  الوفاة 26 يناير 1990 (94 سنة) [1][2][3][4][5][7]  مواطنة الولايات المتحدة[9][10]  عضو في ا…

State forest in Kentucky, United States Knobs State Forest and Wildlife Management AreaTerminus of the orange trailLocation in the United StatesShow map of the United StatesLocation in KentuckyShow map of KentuckyLocationBullitt County, KentuckyNearest cityShepherdsville, KentuckyCoordinates37°52′53″N 85°40′35″W / 37.88139°N 85.67639°W / 37.88139; -85.67639Area2,035 acres (8.24 km2)Max. elevation975 feet (297 m)Min. elevation467 feet (142 m…

  提示:此条目页的主题不是中華人民共和國最高領導人。 中华人民共和国 中华人民共和国政府与政治系列条目 执政党 中国共产党 党章、党旗党徽 主要负责人、领导核心 领导集体、民主集中制 意识形态、组织 以习近平同志为核心的党中央 两个维护、两个确立 全国代表大会 (二十大) 中央委员会 (二十届) 总书记:习近平 中央政治局 常务委员会 中央书记处 中…

Serie Liebig Italiana n°344 (numerazione Catalogo Sanguinetti) Le figurine Liebig furono una serie di figurine pubblicate dalla Liebig tra il 1872 e il 1975. In totale furono pubblicate 1871 serie di figurine, di cui la gran parte è formata da sei immagini accostate. Indice 1 Nascita e storia delle figurine Liebig 2 Approfondimenti 3 Le serie Liebig Italiane 4 Stato di conservazione 5 Voci correlate 6 Altri progetti 7 Collegamenti esterni Nascita e storia delle figurine Liebig Le figurine Lieb…

Pour les articles homonymes, voir Jeux olympiques de 1992. Jeux olympiques d'été de 1992 Localisation Pays hôte Espagne Ville hôte Barcelone Coordonnées 41° 21′ 54″ N, 2° 09′ 18″ E Date Du 25 juillet au 9 août 1992 Ouverture officielle par Juan Carlos IerRoi d'Espagne Participants Pays 169 Athlètes 9 356(6 652 masc. et 2 704 fém.) Compétition Nouveaux sports Baseball, Badminton et Judo féminin Nombre de sports 25 Nombre de discipli…

ヨハネス12世 第130代 ローマ教皇 教皇就任 955年12月16日教皇離任 964年5月14日先代 アガペトゥス2世次代 レオ8世個人情報出生 937年スポレート公国(中部イタリア)スポレート死去 964年5月14日 教皇領、ローマ原国籍 スポレート公国親 父アルベリーコ2世(スポレート公)、母アルダその他のヨハネステンプレートを表示 ヨハネス12世(Ioannes XII、937年 - 964年5月14日)は、ロー…

River in SerbiaJablanicaLocationCountrySerbiaPhysical characteristicsSource  • locationGoljak Mouth  • locationSouth Morava • coordinates43°07′34″N 21°55′51″E / 43.12601°N 21.93084°E / 43.12601; 21.93084Length85 km (53 mi)[1]Basin size894 km2 (345 sq mi)[2]Basin featuresProgressionSouth Morava→ Great Morava→ Danube→ Black Sea The Jablanica (Serbia…

2018 single by Avenged SevenfoldMad HatterSingle by Avenged Sevenfoldfrom the EP Black Reign ReleasedSeptember 17, 2018RecordedMarch 2018GenreHeavy metalLength5:04LabelWarner Bros.Songwriter(s) M. Shadows Zacky Vengeance Synyster Gates Johnny Christ Producer(s)Joe BarresiAvenged Sevenfold singles chronology Wish You Were Here (2017) Mad Hatter (2018) Set Me Free (2020) Mad Hatter is a song by American heavy metal band Avenged Sevenfold, released as the lead single from the EP Black Reign on Sept…

UnchartedGenreAksi-petualangan, third-person shooter, peronPengembangNaughty DogBend StudioBluepoint GamesPenerbitSony Interactive EntertainmentPembuatNaughty DogPlatformPlayStation 3PlayStation 4PlayStation VitaAndroidiOSAsal platformPlayStation 3Rilis pertamaUncharted: Drake's Fortune19 November 2007Rilis terakhirUncharted 4: A Thief's End10 Mei 2016Situs webOfficial website Uncharted adalah seri video game yang dikembangkan oleh Naughty Dog dan diterbitkan oleh Sony Interactive Entertainment …

يو إف سي ليلة القتال: الزومبي الكوري ضد رودريغيز الجهة المنظمة يو إف سي  الرياضة فنون القتال المختلطة  البلد الولايات المتحدة  يو إف سي 230  يو إف سي ليلة القتال: ماغني ضد بونزينيبيو  تعديل مصدري - تعديل   يو إف سي ليلة القتال: الزومبي الكوري ضد رودريغيز (بالإنجليز…

British politician Sir Charles LemonBtEarly photograph showing people, including Sir Charles Lemon, bottom left, at Carclew. Taken in August 1841 by Henry Fox Talbot, Charles' nephewBorn3 September 1784Died13 February 1868(1868-02-13) (aged 83)NationalityBritishOccupationPoliticianSpouseLady Charlotte Ann FoxstrangwaysChildrenCharles William(died aged 13 months)Charles William (died aged 12) Charlotte Augusta Caroline (died aged 10)Parent(s)William LemonJane Buller Sir Charles Lemon, 2nd Ba…

Food ethics topic Part of a series onAnimal rights Overview Animal welfare Around the world History Timeline Animal cruelty Veganism Vegetarianism Primate rights in research Movement Advocates Vegans Vegetarians Groups Animal abuse Animal–industrial complex Killing Mutilation Wild animals Consumption Dogs Horses Cats Cattle Bloodsports Bullfighting Hunting Fishing Animal testing Cosmetic Captivity Zoos Circuses Oceanariums Companion animals Puppy mills Abandonment Ideas Abolitionism Animal pro…

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This article may require cleanup to meet Wikipedia's quality standards. The specific problem is: Subject of article is not properly defined or explained. Please help improve this article if you can. (March 2016) (Learn how and when to remove this message) This article relies largely or entirely on a single source. Relevant discussion may be fou…

Entire period of Habsburg rule in the Low Countries (1482-1797) This article is about the entire period of Habsburg rule in the Low Countries. For the rule of the Spanish branch, see Spanish Netherlands. For that of the Austrian branch, see Austrian Netherlands. Habsburg NetherlandsHabsburgse Nederlanden (Dutch)Pays-Bas des Habsbourg (French)1482–1797 Cross of Burgundy Coat of arms(Philip IV) The Low Countries in 1560.   Habsburg Netherlands  Prince-Bishopric of L…

Grammatical construction Gonna redirects here. For the Blake Shelton song, see Gonna (song). For the river of Saxony-Anhalt, Germany, see Gonna (Helme).Gonna redirects here. Not to be confused with Gunna. Part of a series onEnglish grammar MorphologyPluralsPrefixes (in English)Suffixes (frequentative) Word typesAcronymsAdjectivesAdverbs (flat)ArticlesCoordinatorsCompoundsDemonstrativesDeterminers (List here)ExpletivesIntensifierInterjectionsInterrogativesNounsPortmanteausPossessivesPrepositions …

Historical ancestor of the modern book This article is about ancient and medieval books. For other uses, see Codex (disambiguation). The Codex Gigas, 13th century, Bohemia The codex (pl.: codices /ˈkoʊdɪsiːz/)[1] was the historical ancestor of the modern book. Instead of being composed of sheets of paper, it used sheets of vellum, papyrus, or other materials. The term codex is often used for ancient manuscript books, with handwritten contents.[2] A codex is bound by stacking …

Querida AmazoniaSpanish : Amazon tercintaSurat ensiklik dari Paus Fransiskus Tanggal02 Februari 2020 (2020-02-02)ArgumenUntuk wilayah Pan-AmazonNomor ensiklik5 dari 7 dari kepausanNaskahDalam bahasa Inggris←Christus vivit Laudate Deum → Querida Amazonia (Amazonia Tercinta) adalah anjuran apostolik dari Paus Fransiskus pasca-sinode tahun 2020, yang ditulis sebagai tanggapan terhadap Sinode Para Uskup untuk wilayah Pan-Amazon diadakan di Roma pada bulan Oktober 2019. Berfokus pada wilayah…

مصر فيالألعاب الأولمبية الصيفية 2020الرمزEGYاللجنةاللجنة الأولمبية المصريةالموقعwww.egyptianolympic.org باللغة العربيةفي طوكيو، اليابانالرياضيون138 في 24 رياضاتحامل العلمهداية ملاك وعلاء الدين أبو القاسم (حفل الافتتاح)الميدالياتالترتيب 53 ذهبية 1 فضية 1 برونزية 4 المجموع 6 الظهور ف…

المؤتمر الصهيوني العالميالتاريخالتأسيس 1897 المؤسس تيودور هرتزل الرؤساء تيودور هرتزل (1897 – 1904)ماكس نورداو (1905 – )دافيد فولفسون (1907 – 1913) الإطارالنوع تتابع أحداثكونغرس التنظيمموقع الويب wzo.org.il… (الإنجليزية، ‏العبرية) تعديل - تعديل مصدري - تعديل ويكي بيانات المؤتمر الصهيوني ال…