ECMAScript for XML

ECMAScript for XML (short: E4X ) is a standardized programming language extension for JavaScript and similar languages ​​that follow the ECMAScript standard. The extension makes it possible to use regular XML and HTML elements as a native part of the language.

Example

Using E4X, it is possible to also set variables in the XML elements. Also attributes can be addressed directly. In JavaScript, this process looks like this:

Implementations and support

E4X is partially implemented in the used by Mozilla Firefox Gecko engine, and SpiderMonkey and Rhino. The programming and scripting language ActionScript 3 supports E4X completely.

Standardization

E4X is standardized by ECMA International in the ECMA -357 standard ( currently in the second version dated December 2005). In addition, E4X is specified by the ISO in ISO / IEC 22537 (currently in the first amended in February 2006).

E4X is now ( March 2013 ) obsolete ( superseded by DOM options ). As an alternative JXON is recommended.

296308
de