MCQ Bank
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
Why we used setAttribute() method?
- A) To change an attribute value
- B) To change a text value
- C) To change a node value
- D) To change an element value
Nodes in the node list are accessed with index numbers starting from ___________.
- A) 2
- B) -1
- C) 1
- D) 0
Which of the following methods can be used to create a new comment node?
- A) createnewComment()
- B) createComment()
- C) none of the given options
- D) newcreateComment()
The ______ method can be used to remove the specified node.
- A) removeChild()
- B) reChild()
- C) dropChild()
- D) deleteChild()
Traversing means _________ through or traveling across the node tree.
- A) adding
- B) looping
- C) printing
- D) spinning
By using the _________, we can loop through a node list.
- A) node type
- B) length property
- C) title
- D) None of the given options