Consider the code snippet below. Which of the given options represents the correct output of the code attribute substitution for special characters in E4X? var b = 'Best of luck "Studentname & Rol...
<foo a="Best of luck "Studentname & Roll no" for your exam"/> 100.0%
<foo a="Best of luck Studentname & Roll no for your exam"/> 0.0%
<foo a="Best of luck "Studentname & Roll no" for your exam"/> 0.0%
Consider the code snippet below. Which of the given options represents the correct sequence of outputs when this code is executed in E4X? var p1 = <p>Kibology for all.</p>; alert(p1.name().uri);...
'',http://www.w3.org/1999/xhtml,'' 0.0%
'','','' 0.0%
'',http://www.w3.org/1999/xhtml,http://www.w3.org/1999/xhtml 100.0%
None of the above 0.0%
Consider the following code snippet. Which of the given options would be used in E4X to change the color of the descendant node chair? var element = <Home> <Room> <Furniture> <ch...
element.chair.color="light brown" 100.0%
element.chair.@color="light brown" 0.0%
element..chair.@color="light brown" 0.0%
element...chair.@color="light brown" 0.0%
State whether true or false: An arbitrary xml file can be loaded as an E4X ready object.
State whether true or false: The QName.prototype.toString() method throws a TypeError exception if its value is not a QName object.
What is the correct way to add a method to an XML.prototype in E4X?
XML.prototype.function::methodName 0.0%
XML.prototype.function::[methodNameString] 0.0%
XML.prototype.method::[methodNameString] 100.0%
What is the default value of the property prettyIndent in E4X?
2 0.0%
0 0.0%
4 0.0%
1 100.0%
What is the value returned when the input parameter type of the XMLList() function in E4x is Number?
TypeError exception 0.0%
The value is first converted to a string and then converted to an XMLList object. 100.0%
The value is converted to an XMLList object. 0.0%
The input value is returned unchanged. 0.0%
What will be the output of the following code snippet? var customer = <customer> <phone type="mobile">888-555-1212</phone> <phone type="office">888-555-2121</phone> <preferred>mobile</prefe...
0 100.0%
3 0.0%
NaN 0.0%
2 0.0%
What will be the output of the following code snippet? element = <xhtml:p xmlns:xhtml="http://www.example.org">Kibology for all.</xhtml:p>; elementName = element.name(); alert(elementN...
1-p,2-http://www.example.org 100.0%
1-http://www.example.org,2-p 0.0%
1-http://www.example.org,2-http://www.example.org 0.0%
1-p,2-p 0.0%
What will be the output of the following code snippet? var xml = <body></body>; xml.appendChild("hello"); Xml.appendChild(" world"); xml.normalize(); alert(xml.children().length());
Which of the following are not global methods and properties in E4X?
ignoreComments 0.0%
ignoreWhiteSpace 0.0%
setName() 0.0%
setNamespace() 100.0%
a and b 0.0%
c and d 0.0%
Which of the following can be used to create attribute values by placing variables and expressions within them?
[] 0.0%
() 0.0%
{} 0.0%
<> 100.0%
Which of the following characters are treated as white space characters?
tab 50.0%
space 0.0%
Line feed 50.0%
enter 0.0%
Which of the following is not a reserved keyword in E4X and JavaScript?
volatile 0.0%
transient 0.0%
super 100.0%
version 0.0%
synchronized 0.0%
Which of the following is not a valid built-in method for XMLList objects in E4X?
attributes() 0.0%
descendants([name]) 0.0%
hasOwnProperty(propertyName) 100.0%
append() 0.0%
Which of the following is not true of the Namespace constructor in E4X?
If the value of the prefixValue parameter is undefined, the prefix is set to undefined. 0.0%
If the value is a valid XML name, the prefix property is set to a string. 100.0%
If the value is not a valid XML name, the prefix property is set to undefined. 0.0%
If a QName object is passed, the uri property is set to the value of the QName object's uri property. 0.0%
Which of the following is the correct syntax for calling the Namespace constructor as a function in E4X?
Namespace() 50.0%
Namespace(prefixValue) 0.0%
Namespace(uriValue) 50.0%
Namespace(prefixValue,uriValue) 0.0%
Which of the following is the correct way to create an XML object in E4X?
var languages = new XML('<languages type="dynamic"><lang>JavaScript</lang><lang>Python</lang></languages>'); 0.0%
var languages XML = new XML('<languages type="dynamic"><lang>JavaScript</lang><lang>Python</lang></languages>'); 100.0%
var languages = <languages type="dynamic"> <lang>JavaScript</lang> <lang>Python</lang> </languages>; 0.0%
All of the above are correct. 0.0%
a and c 0.0%
b and c 0.0%
Which of the following methods is not one of the global methods and properties in E4X?
isXMLName() 0.0%
isScopeNamespaces() 50.0%
namespaceDeclarations() 0.0%
removeNamespaces() 50.0%
Which of the following methods would give the output corresponding to the code snippet? var test = <type name="Joe"> <base name="Bob"></base> example </type>; output: <type name="Joe"> <ba...
alert(test.toString()); 0.0%
alert(test.toXMLString()); 50.0%
alert(test.text()); 0.0%
alert(test.elements()); 50.0%
Which of the following operators is used for inserting XML objects in the context of their parent in E4X?
= 0.0%
+ 0.0%
+= 100.0%
=+ 0.0%
Which of the following options can be used for adding direct support for XML to JavaScript?
E4X 0.0%
regex 0.0%
Generators and Iterators 0.0%
let 100.0%
Which of the following options can be used to delete a child node of an XML object in E4X?
delete xmlobject.child; 0.0%
delete xmlobject.child[0]; 0.0%
delete xmlobject.@attribute; 100.0%
All of the above 0.0%
Which of the following options is the correct alternative to the code snippet so as to get the given output? Code: var e= <employee> <name>Smith</name> <designation>S/w Engineer</designation> </e...
e.insertChildAfter(null,<prefix>Mr.</prefix>); 0.0%
e.insertChildBefore(<prefix>Mr.</prefix>); 0.0%
b.e.insertChildAfter(null,<prefix>Mr.</prefix>); 0.0%
b.e.insertChildBefore(null,<prefix>Mr.</prefix>); 100.0%
Which of the following options is used to access the attributes in E4X?
@ 0.0%
:: 100.0%
# 0.0%
* 0.0%
Which of the following options would be returned by the code shown in the code snippet: var f = <foo> <a> text </a> <a> <b/> </a> </foo>; alert(f.a[...
p-false,q-true,r-true,s-false 0.0%
p-true,q-false,r-false,s-true 0.0%
p-1,q-0,r-0,s-1 100.0%
p-0,q-1,r-1,s-0 0.0%
Which of the following public methods in E4X has the return type XML?
localName() 0.0%
nodeKind() 0.0%
parent() 100.0%
valueOf() 0.0%
Which of the following settings are there in E4x to influence parsing and serialization? element = <xhtml:p xmlns:xhtml="http://www.example.org">Kibology for all.</xhtml:p>; elementName = ...
ignoreComments 0.0%
ignoreProcessingInstructions 0.0%
ignoreWhitespace 0.0%
All of the above 100.0%
Which of the given options represents the correct length when alert(Emp..*.length()); is applied to the following code? var Emp = <Emp> <name>Mark</name> <likes> <os>Linux</os> <browser>...
11 0.0%
5 0.0%
7 0.0%
12 100.0%