document.write(employees.person.(name == "Tove").age);
This example applies only to Firefox!
Using E4X, you can declare Date or by way of Array object variable declaration XML object variable:
var y = new Date()
var z = new Array()
ECMA organization (founded in 1961), is dedicated to information and communication technologies (ICT) and consumer electronics (CE) standardization. ECMA standard established for:
- C # language
- International character sets
- Magnetic tape
- data compression
- data communication
- and many more...
Do not use E4X
The following example is a cross-browser instance, the instance to load an existing XML document ( "note.xml") into the XML parser, and displays a message Description:
//code for Internet Explorer
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
// code for Mozilla, Firefox, etc.
else (document.implementation && document.implementation.createDocument)
The following example is the same as the example above, but using E4X:
More simple, is not it?
Firefox is the only E4X support a better browser.
There is no support E4X areOpera, ChromeorSafari.
So far, there is no indication E4X support inInternet Explorer.
E4X is not widely supported. Maybe too practical features it offers, has not been involved in other solutions:
- For the complete XML processing, you also need to learn XML DOM and XPath
- For access XMLHttpRequests, the JSON is the preferred format.
- For simple document processing, JQuery choice easier.