Question: Using E4X how can we make XML easier to use?
Answer: E4X makes easier to use JavaScript to pasre and manipulate XML.This is also use to enable XML library or component to act with XML.On different browsers libraries and components perform with different syntax and work differently. I have given you example where I show how to load an existance XML document("message.xml")into XML parser and to show note from message.Example: Without use of E4X.var xmlDoc//This code is made only for Internet Explorer.if (window.ActiveXObject){xmlDoc = new ActiveXObject("Microsoft.XMLDOM")xmlDoc.async=false;xmlDoc.load("message.xml")displaymessage()}// This code is made for Mozilla, Firefox etc.else (document.implementation
Question:
Using E4X how can we make XML easier to use? Answer:
E4X makes easier to use JavaScript to pasre and manipulate XML.This is also use to enable XML library or component to act with XML.On different browsers libraries and components perform with different syntax and work differently. I have given you example where I show how to load an existance XML document("message.xml")into XML parser and to show note from message.Example: Without use of E4X.var xmlDoc//This code is made only for Internet Explorer.if (window.ActiveXObject){xmlDoc = new ActiveXObject("Microsoft.XMLDOM")xmlDoc.async=false;xmlDoc.load("message.xml")displaymessage()}// This code is made for Mozilla, Firefox etc.else (document.implementation Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
There should not be any Spelling Mistakes.
There should not be any Gramatical Errors.
Answers must not contain any bad words.
Answers should not be the repeat of same answer, already approved.
Answer should be complete in itself.
Related Questions
View Answer
Using E4X how can we define XML document as a JavaScript object?