4. Using E4X we can declare an XML object variable as same as declare Date and Array variable.
var p = new XML()
var q = new Date()
var r = new Array()
ECMA(The European Computer Manufacturers Association)international was founded in 1961.
ECMA is an organization made to standardization of information and Communication Technology(ICT) and Consumer Electronics(CE).
We use ECMA standard with
3.International Character Sets
7.Data Communication etc.
ECMA-357 (E4X) was standardized in June2004.
I have you simple XML document.
E4X support limited browsers.No,mainstream browser has supported by E4X.
Mozilla engine(1.8)(beta version) is limited support to E4X.
We can say that Firebox 1.1 is an first version that support E4X.E4X is also expected to the future version of Internet Explorer.
Firefox 1.1: Firefox1.1 can support best for E4X as compare to other browsers.
I have written an XML document.
We can stroe this XML document as an string in variable order.
var order = new XML(txt)
Assign the XML text to the XML object variable directly.
var order = new XML()
We can also calculate the price like that,
var total=order.item.qty * order.item.price
Can we display the customers full name like that,
Can add new items like that,
We can display the order id like that,
We can calculate the total price, when the order has many items like that,
for each (i in order.item)