MCQ Bank
Which parameter in replaceData() method tells the parser how many characters to replace?
- A) length
- B) offset
- C) None of the given
- D) string
Which property of XML document represents the root node?
- A) nodeType
- B) nodeName
- C) nodeValue
- D) documentElement
Which of the following specifies the type of node?
- A) nodeValue
- B) nodeName
- C) nodeType
- D) None of the given
when you want to extract the value of each element. This is called __________________.
- A) "Traversing the node tree"
- B) "Traversing first and last tree"
- C) "Traversing the last tree"
- D) "Traversing the first tree"
When a node is removed, ___________________________.
- A) its child nodes navigated to other nodes.
- B) its child nodes are not removed.
- C) all its child nodes are also removed.
- D) None of the above.
The term CDATA is used about ________ data that should not be parsed by the XML parser.
- A) video
- B) Null
- C) text
- D) audio
When using properties or methods like childNodes or getElementsByTagName(), a node list __________ is returned.
- A) Object
- B) Function
- C) Class
- D) Array
Whenever we access the nodes in the node tree via the relationship between these nodes, is called_________.
- A) childNodes
- B) none of the given options
- C) parentNode
- D) navigating nodes
What will be the nodeValue for attribute nodes?
- A) Node value
- B) Element value
- C) Text value
- D) Attribute value
if (x[i].nodeType == 2) then node type will be:
- A) Element
- B) Node
- C) None of the given options
- D) Attribute
XML often contains new line, or _______ space characters, between nodes.
- A) green
- B) black
- C) white
- D) red
Which of the following methods return attribute node?
- A) None of the given options
- B) getElementsByTagName()
- C) getAttribute()
- D) getAttributeNode()
The _____________ method creates a new element node.
- A) getElement()
- B) createElement()
- C) newElement()
- D) makeElement()
Which of the following is used to get the value of an attribute?
- A) getAttribute()
- B) nodeValue
- C) getAttributeNode
- D) getElementsByTagName()
Element nodes do not have a _________ value.
- A) text
- B) loop
- C) audio
- D) video
The removeAttribute() method removes _________ by its name.
- A) Attribute value
- B) None of the given
- C) Root node
- D) Attribute node
The attributes property of an element node returns a list of attribute nodes. This is called a named _________ .
- A) node map
- B) node function
- C) function node
- D) array map
The _________ property of a node list is the number of nodes in the list.
- A) height
- B) count
- C) length
- D) width
Which of the following nodes can be created by using create CDATASection() method?
- A) Parent node
- B) Child node
- C) CDATA section node
- D) None of the given options
In the XML DOM, each node is a/(an) ________.
- A) Property
- B) Root
- C) Object
- D) Parser