ECMAScript for XML

Uses your system voice; voice and rate in settings.

Snapshot

≈ 3 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

ECMAScript for XML (E4X) was an extension to ECMAScript (which includes ActionScript, JavaScript, and JScript) to add native support for Extensible Markup Language (XML). The goal was to provide a simpler alternative to the Document Object Model (DOM) interface for accessing XML documents. E4X added XML as a primitive data structure to allow faster and easier access to XML manipulation and better support within the language. E4X was standardized by Ecma International in the ECMA-357 standard. The first edition was published in June 20041 and the second edition in December 2005. However, the E4X standard was deprecated by the Mozilla Foundation in 2014, and it was withdrawn by ISO/IEC in 2021. 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 20031 . BEA's implementation was based on Rhino and released before the ECMAScript E4X spec was completed in June 2004.

ECMAScript for XML (E4X) was an extension to ECMAScript (which includes ActionScript, JavaScript, and JScript) to add native support for Extensible Markup Language (XML). The goal was to provide a simpler alternative to the Document Object Model (DOM) interface for accessing XML documents. E4X added XML as a primitive data structure to allow faster and easier access to XML manipulation and better support within the language. E4X was standardized by Ecma International in the ECMA-357 standard. The first edition was published in June 2004 and the second edition in December 2005. However, the E4X standard was deprecated by the Mozilla Foundation in 2014, and it was withdrawn by ISO/IEC in 2021. 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 2003 . BEA's implementation was based on Rhino and released before the ECMAScript E4X spec was completed in June 2004.

Browser support

E4X was supported by SpiderMonkey (used in Firefox and Thunderbird). However, E4X was deprecated in Firefox 10 and eventually removed in Firefox 21. E4X was supported by the OpenOffice.org software suite.

Example

let sales = ; alert(sales.item.(@type == "carrot").@quantity); alert(sales.@vendor); for each(let price in sales..@price) { alert(price); } delete sales.item[0]; sales.item += ; sales.item.(@type == "oranges").@quantity = 4;

See also

JavaScript XML (JSX) – an XML based markup specifically for DOM manipulation

References

External links

ECMA-357 (withdrawn first edition, second edition) E4X at faqts.com (or via WayBack Machine) Slides from 2005 E4X Presentation by Brendan Eich, Mozilla Chief Architect E4X at Mozilla Developer Center Introducing E4X at xml.com: compares E4X and json Processing XML with E4X at Mozilla Developer Center E4X: Beginner to Advanced at Yahoo Developer Network

Text derived from https://en.wikipedia.org/w/index.php?oldid=1377633944 under CC BY-SA 4.0; modifications have been made.

References

  1. ↩Wikipedia publication date (×3) · confidence 0.95 https://en.wikipedia.org/w/index.php?oldid=1377633944