Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Coding/Programming Interviews:Active Template Library (ATL)ActiveXApplication DeveloperArtificial intelligenceAssemblyAssociate Software EngineerAWKAWTC ProgrammingC++ ProgrammingCGI PerlCGI ProgrammingCMMICobolCritical ReasoningData Structures TreesDCOM COMDelphiDTDE4XExtensible Stylesheet Language (XSL)FortranFull-Stack DeveloperHaskellHTML DOMILUIPhone DeveloperJasper Reports DeveloperJava DeveloperLisp ProgrammingLotus NotesMicrosoft Foundation Class (MFC)Mobile DeveloperMVC DeveloperNode.jsOOPPascalPerl ProgrammingPHPPHP DeveloperProgrammingProgramming AlgorithmsProgramming ConceptsPythonRubyRuby on RailsRuby on Rails DeveloperSenior Front End DeveloperSenior Software DeveloperSignature ProgramSOASocket ProgrammingSoftware Development EngineerSoftware engineeringSr. PHP ProgrammerStack And QueueSTLSwift DeveloperTCL (Tool Command Language)Team Leader Android DeveloperUMLUnity 2D Games DeveloperUnity 3D DeveloperUnity DeveloperVBA (Visual Basic for Applications)Visual Basic (VB)Visual C++Web DevelopmentWin32APIWindows ProgramingWordPress DevelopmentWSDLXFormsXHTMLXLinkXMLXPathXQueryXSL-FOXSLT
Copyright © 2018. All Rights Reserved
E4X Interview Question:
Using E4X how can we define XML document as a JavaScript object?
Submitted by: AdministratorAd
I have given you example to show XML document as JavaScript object.Example:
I have you simple XML document.
<message>
<date>2009-26-01</date>
<to>Abhi</to>
<from>Sud</from>
<heading>Don't forget</heading>
<body>Happy Birthday!</body>
</message> We can store this XML document in a string calles as message into an XML object variable vusing JavaScript.var v = new XML(message) 'or' Assign the XML text to the XML object variable directly.var v = new XML()v=<message>
<date>2009-26-01</date>
<to>Abhi</to>
<from>Sud</from>
<heading>Don't forget</heading>
<body>Happy Birthday!</body>
</message>
We can use JavaScript like that,document.write(v.from)
Output:Sud
Submitted by: Administrator
I have you simple XML document.
<message>
<date>2009-26-01</date>
<to>Abhi</to>
<from>Sud</from>
<heading>Don't forget</heading>
<body>Happy Birthday!</body>
</message> We can store this XML document in a string calles as message into an XML object variable vusing JavaScript.var v = new XML(message) 'or' Assign the XML text to the XML object variable directly.var v = new XML()v=<message>
<date>2009-26-01</date>
<to>Abhi</to>
<from>Sud</from>
<heading>Don't forget</heading>
<body>Happy Birthday!</body>
</message>
We can use JavaScript like that,document.write(v.from)
Output:Sud
Submitted by: Administrator
Copyright 2007-2025 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.

https://InterviewQuestionsAnswers.ORG.
