Native XML Scripting with E4X

Track: Core Technologies, End-User Applications

Audience Level: High Level/Technical view

Time: Wednesday, November 16 11:45

Author: John Schneider, AgileDelta, Inc.

Keywords: E4X, Javascript, ECMAScript, Script, Native XML, XSLT, XQuery, XPath, DOM, Mozilla, Rhino, SpiderMonkey, Firefox

Abstract:

Developing software to create, navigate and manipulate XML data is a major part of almost every developer’s job. However, reading, writing and maintaining XML code can be tedious, time consuming and error prone requiring a heap of reference manuals and a large technology stack. Native XML scripting provides a far more intuitive, familiar and natural way for developers to deal with XML. It extends popular scripting languages with native XML data types, XML literals and a small set of new operators useful for common XML operations, such as searching and filtering. Because it reuses familiar, intuitive programming constructs and operators, it is extremely easy for developers to learn, read and write, requiring little to no additional knowledge.

ECMAScript for XML (E4X) is a new international standard with broad industry support that adds native XML scripting to JavaScript. The Mozilla open source project includes two independent implementations of E4X that make it easy to use E4X and embed it in applications. E4X scripts are smaller than comparable XSL transforms, XML Queries or DOM routines and more intuitive to the average developer. They are easier to read, write and maintain requiring less developer time, skill and specialized knowledge. In addition, E4X is a lighter weight technology enabling a wide range of mobile applications.