Somebody pinch me and don't tell me this is an April Fool's joke. This is absolutely what I have been hankering for. JavaScript gets native XML support (E4X). It has already been adopted by BEA.
Examples
for (var atom in srcDoc..ATOM) { // Loop through each ATOM tag in the source
var name = y.employees.employee.name;
var names = y..name; // equivalent to y.selectNodes(".//name")
y.employees.employee.(department.@id == 500 && age > 27);
There are also syntacical sugar for constructing XML documents.
In all, a very cool development.
|