MCQ Bank
In x.nodeName and x.nodeValue, x is __________.
- A) the attribute of node
- B) parent node
- C) the value of node
- D) node object
On a server request, the readyState changes from ______.
- A) 1 to 5
- B) 1 to 4
- C) 0 to 4
- D) 0 to 3
The getElementsByTagName() method returns a(n) ________.
- A) value of element
- B) node list
- C) attribute value
- D) single value
What is the description of the attribute-type NMTOKEN.
- A) The value is a list of other ids
- B) The value is a valid XML name
- C) The value is a list of valid XML names
- D) The value is the id of another element
___________ is a collection of nodes or pieces of information, organized in a hierarchy.
- A) None of the given
- B) XSL File
- C) DOM Document
- D) DTD
DOM has three parts XML DOM, HTML DOM and __________.
- A) None of the given
- B) Parser DOM
- C) Core DOM
- D) Flash DOM
In a DTD, attributes are declared with an _________ declaration.
- A) ATTLIST
- B) ATTRIBUTELIST
- C) None of the above
- D) ATTRLIST
During a server request, the readyState = 3 means:
- A) request received
- B) processing request
- C) server connection established
- D) request finished and response is ready
Look at the following XML fragment:
<bookstore> <book category="cooking">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
</bookstore>
In the XML above, the <title> element is the ___________
- A) first child of the <bookstore> element.
- B) last child of <bookstore> element.
- C) first child of the <book> element.
- D) last child of <book> element.
The _____ element is the root element of every XML Schema?
- A) xmlns:xs
- B) None
- C) targetNamespace
- D) <schema>
The operational speed of XML DOM, compared to SAX is:
- A) None of the given
- B) Slower
- C) Faster
- D) Equal
XML DOM is:
- A) Platform independent
- B) Dynamic in nature
- C) All of the given
- D) Traversable
Everything is treated in Document Object Model (DOM) as ___________.
- A) Attributes
- B) Methods
- C) Elements
- D) Nodes
The following statement returns all <title> elements under the ________:
x.getElementsByTagName("title");
- A) title
- B) Tag
- C) Name
- D) x element
Which one of the following languages used to access and manipulate methods and properties of objects?
- A) JavaScript
- B) XML
- C) HTML
- D) C++
Which one of the following is not an advantage of XML DOM?
- A) Language and Platform independent
- B) It is modifiable
- C) Operational speed is slower than SAX
- D) It is traversable
Entities can be declared ___________
- A) internal
- B) internal or external
- C) external
- D) None of the given
Nodes can be navigated using node ____________.
- A) relationships
- B) block
- C) array
- D) class
Whenever we want to add a child node to an existing node which method will be used?
- A) None of the given options
- B) createChild()
- C) appendChild()
- D) createElement()
Parsed Character Data (PCDATA) is a term used about _______ data that will be parsed by the XML parser.
- A) element
- B) character
- C) none of the given options
- D) text