Skip to main content

Web Services Development MCQs with Answers

Practice important Web Services Development MCQs with answers and explanations.

Chapter: 12
Q321:
When generating XML from a database in ASP, which language is used for querying the database?
A. JavaScript
B. SQL
C. XQuery
D. XPath
Correct Answer: B
Chapter: 12
Q322:
What does the fragment xmlns="http://www.vu.edu.pk" specify in an XML schema?
A. The schema uses VU's data types
B. The schema uses default data types
C. The schema uses a default namespace
D. The schema references VU's elements
Correct Answer: C
Chapter: 12
Q323:
Which method is used to transform XML to XHTML on the server with XSLT in ASP?
A. xml.transform()
B. xml.transformNode()
C. xml.convert()
D. xml.write()
Correct Answer: B
Chapter: 12
Q324:
Fill in the blank: An attribute value in XML must be tested against ________ to ensure validity.
A. Schema
B. DTD
C. XSLT
D. XQuery
Correct Answer: B
Chapter: 12
Q325:
Fill in the blank: A server response with XML content must have its content type set to ________.
A. text/html
B. text/plain
C. text/xml
D. application/xml
Correct Answer: C
Chapter: 12
Q326:
Fill in the blank: In ASP, ________ is used to create an instance of the Microsoft XML parser.
A. CreateObject("Microsoft.XMLDOM")
B. CreateObject("XMLParser")
C. new XMLDOM()
D. setParser("Microsoft.XMLDOM")
Correct Answer: A
Chapter: 12
Q327:
Which of the following is NOT a valid method of generating XML?
A. Using a database
B. Writing XML files manually
C. Transforming XML with XSLT
D. Using JSON to convert XML
Correct Answer: D
Chapter: 12
Q328:
What is the correct way to declare an external entity in a DTD?
A. <!ENTITY entity-name SYSTEM "URL/URI">
B. <xs:ENTITY entity-name SYSTEM "URL/URI">
C. <?ENTITY SYSTEM "URL/URI"?>
D. <!SYSTEM ENTITY "URL/URI">
Correct Answer: A
Chapter: 12
Q329:
Fill in the blank: In the second XML example provided, the date is represented as a ________.
A. Child element
B. Attribute
C. Comment
D. Schema element
Correct Answer: A
Chapter: 13
Q330:
What does DOM stand for?
A. Data Object Model
B. Document Object Model
C. Dynamic Object Model
D. Direct Object Model
Correct Answer: B
Chapter: 13
Q331:
The DOM is separated into how many different parts?
A. 2
B. 3
C. 4
D. 5
Correct Answer: B
Chapter: 13
Q332:
Which DOM is the standard model for XML documents?
A. Core DOM
B. HTML DOM
C. XML DOM
D. CSS DOM
Correct Answer: C
Chapter: 13
Q333:
What method is used to change the inner HTML content of an element?
A. getElementById()
B. setElementById()
C. changeElementById()
D. document.write()
Correct Answer: A
Chapter: 13
Q334:
In the DOM, which property is used to get the child nodes of an element?
A. childNodes
B. parentNode
C. nodeName
D. nodeValue
Correct Answer: A
Chapter: 13
Q335:
Which of the following is a disadvantage of XML DOM?
A. Platform dependent
B. Consumes more memory
C. Cannot traverse nodes
D. Does not support HTML
Correct Answer: B
Chapter: 13
Q336:
What does the XMLHttpRequest object allow you to do?
A. Reload the page
B. Access local files only
C. Send requests to a server without reloading the page
D. Delete server data remotely
Correct Answer: C
Chapter: 13
Q337:
In the DOM, which node has no children?
A. Element
B. Document
C. Text
D. Entity
Correct Answer: C
Chapter: 13
Q338:
What is the correct sequence for readyState values in XMLHttpRequest from initialization to completion?
A. 0-1-2-3-4
B. 4-3-2-1-0
C. 1-2-3-4-0
D. 0-3-1-2-4
Correct Answer: A
Chapter: 13
Q339:
Fill in the blank: The method used to parse an XML string into a DOM object is called _____.
A. parseString()
B. DOMParser()
C. XMLParser()
D. xmlDoc()
Correct Answer: B
Chapter: 13
Q340:
In the XML DOM, which of the following is considered a leaf node?
A. Element
B. Text
C. Document
D. Attribute
Correct Answer: B

Test Your Knowledge

Take a timed quiz on Web Services Development

🚀 Start Quiz Now