E4X Tutorial
 |
E4X is a new extension to JavaScript.
E4X adds direct support for XML to JavaScript.
E4X is official in the JavaScript 1.6 standard.
|
E4X Example
var employees=
<employees>
<person>
<name>Tove</name>
<age>32</age>
</person>
<person>
<name>Jani</name>
<age>26</age>
</person>
</employees>;
document.write(employees.person.(name == "Tove").age); |
This example works in Firefox only!
Try it yourself »
|
What You Should Already Know
Before you continue you should have a basic understanding of the following:
To study these subjects first, find all the tutorials you need on our
Home Page.
JavaScript = ECMAScript
ECMAScript is the official name for JavaScript.
ECMAScript is the same as
JavaScript.
ECMA (The European Computer Manufacturers Association) is the organization
standardizing JavaScript.
E4X = JavaScript for XML
E4X means "ECMAScript For XML". It is a standard extension to ECMAScript.
So in real life E4X means "JavaScript for XML".
XML As a JavaScript Object
E4X is an official JavaScript standard that adds direct support for XML.
With E4X, you can declare an XML object variable the same way as you declare a Date or
an Array
object variable:
var x = new XML()
var y = new Date()
var z = new Array()
|
E4X makes scripting for XML with JavaScript very
simple.
Examples are provided in the next chapter.
E4X is a Web Standard
ECMA-262 (JavaScript 1.3) was standardized in December 1999.
E4X is an extension of JavaScript that adds direct support for XML.
ECMA-357 (E4X) was standardized in June 2004.
Read more about the E4X activities at ECMA International.
ECMA International
ECMA International was founded in
1961.
The ECMA organization is dedicated to the standardization of Information and
Communication Technology (ICT) and Consumer Electronics
(CE).
ECMA has developed standards for
- JavaScript
- C# Language
- International Character Sets
- Optical Disks
- Magnetic Tapes
- Data Compression
- Data Communication
- and much more

Whether you're new to XML or already an advanced user, the user-friendly views and powerful entry helpers, wizards, and debuggers in XMLSpy are designed to meet your XML and Web development needs from start to finish.
New features in Version 2010!
- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- XBRL validator, taxonomy editor, taxonomy wizard
- Support for Office Open XML (OOXML)
- Graphical WSDL 1.1/2.0 editor & SOAP debugger
- JSON editing & conversion
- Java, C#, C++ code generation
- 32-bit and 64-bit versions
- And much more!
Download a free trial today!
|
|
|
 |
W3Schools' Online Certification Program
The perfect solution for professionals who need to balance work, family, and career building.
More than 4500 certificates already issued!
|
The HTML Certificate documents your knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
|