Web Services Development MCQs with Answers
Practice important Web Services Development MCQs with answers and explanations.
Multiple Choice Questions
Q361: What does the responseText property return?
- A: XML data
- B: Server URL
- C: The response as a string
- D: Status code
View Answer
C
Q362: Which method should be used to retrieve an XML DOM object?
- A: getDOM()
- B: getResponseXML()
- C: xmlDoc()
- D: parseFromString()
View Answer
D
Q363: What does the getElementsByTagName("title") method return?
- A: A list of elements
- B: A list of attributes
- C: A list of books
- D: A list of authors
View Answer
A
Q364: In the code fragment, what does x[0].childNodes[0].nodeValue return?
- A: The value of the first child node
- B: The name of the first child
- C: The length of the node list
- D: The number of child elements
View Answer
A
Q365: How does the node list update when elements are added or deleted?
- A: It remains static
- B: It updates automatically
- C: It throws an error
- D: It clears all elements
View Answer
B
Q366: What is the result of x.length when getElementsByTagName('title') is called in "books.xml"?
- A: 2
- B: 3
- C: 4
- D: 5
View Answer
C
Q367: What does the attributes property of an element node return?
- A: A named node list
- B: An attribute list
- C: A text node list
- D: A title node list
View Answer
A
Q368: In DOM parsing, which browser treats empty white spaces as text nodes?
- A: Internet Explorer 9
- B: Chrome
- C: Firefox
- D: Safari
View Answer
C
Q369: What function helps navigate between element nodes and skips text nodes?
- A: get_nextSibling
- B: getElementsByTagName
- C: getAttribute
- D: getFirstChild
View Answer
A
Q370: In the following code xmlDoc.documentElement.childNodes, what does documentElement represent?
- A: The first node in the list
- B: The root node
- C: The title node
- D: The author node
View Answer
B