Ch 13: Servlet Context & Configuration

44 Questions44 MCQs0 Short Questions0 Long Questions
๐ŸŽฏ Exam Practice Papers
SEMESTER PASS

CS311 - Introduction to Web Services Development Examination Practice

Timed practice exam simulation for CS311 - Introduction to Web Services Development.

๐Ÿ“˜ VU MID TERM EXAMLectures 1 to 22
โฑ๏ธ 60 Mins

Mid Term Examination

Covers syllabus of Lectures 1 to 22 with 30 high-yield MCQs in a timed exam environment.

๐Ÿ“30 MCQs
โฑ๏ธ60 Minutes
๐Ÿ“— VU FINAL TERM EXAMLectures 23 to 45
โฑ๏ธ 90 Mins

Final Term Examination

Comprehensive semester exam preparation with 45 MCQs covering Lectures 23 to 45 with complete course coverage.

๐Ÿ“45 MCQs
โฑ๏ธ90 Minutes
Showing 21 โ€“ 30 of 44 Questions
Page 3 of 5
Q21
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.2. XML DOM Node Objects and Programming InterfacesEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In the context of the XML Document Object Model (DOM) programming interfaces, each individual node in the XML hierarchy is represented as a(n) _________.
  1. A.Raw string literal
  2. B.Active database relation
  3. C.Object
  4. D.Dynamic system environment variable
Q22
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.1. Introduction to XML DOM (Document Object Model)Mediumโญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following is NOT classified as an advantage of using the XML Document Object Model (DOM) interface to process XML files?
  1. A.It is completely language and platform independent.
  2. B.It is traversable, allowing programs to navigate around the node hierarchy.
  3. C.It is dynamic and modifiable, allowing developers to add, edit, or delete nodes.
  4. D.Its operational speed is slower than SAX due to high memory usage.
Q23
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.2. XML DOM Node Objects and Programming InterfacesEasy๐Ÿ”โญ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In the XML Document Object Model (DOM), which programmatic object represents an individual node in the hierarchical node tree?
  1. A.The nodeList object
  2. B.The node object
  3. C.The document object
  4. D.The element object
Q24
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.11. Accessing DOM Nodes (getElementsByTagName)Medium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In the XML Document Object Model (DOM), what does the following JavaScript statement retrieve? ```javascript x.getElementsByTagName("title"); ```
๐Ÿ’ป javascript Snippet
x.getElementsByTagName("title");
  1. A.All `` elements nested anywhere under the `x` element.
  2. B.The tag name of the element `x`.
  3. C.The node value of the parent of element `x`.
  4. D.Only the first `` element in the XML document.
Q25
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.13. XML Node Properties (nodeName, nodeValue, nodeType)Medium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In XML DOM programming, the `attributes` property of an element node returns a collection of attribute nodes. What is this collection officially called?
๐Ÿ’ป javascript Snippet
var attrList = element.attributes; // returns NamedNodeMap
  1. A.array map
  2. B.named node map
  3. C.node function
  4. D.function node
Q26
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.11. Accessing DOM Nodes (getElementsByTagName)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
When using properties or methods like `childNodes` or `getElementsByTagName()`, what type of collection is returned as a Node List?
๐Ÿ’ป javascript Snippet
var list = xmlDoc.getElementsByTagName("title"); // returns a Node List (array of nodes)
  1. A.Class
  2. B.Object
  3. C.Function
  4. D.Array
Q27
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.18. Creating New Elements, Attributes, and Text NodesMedium๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
True or False: In the W3C XML Document Object Model (DOM) specification, the `Document` interface is the unique interface that provides factory methods to programmatically create other DOM document components.
๐Ÿ’ป java Snippet
Element newElement = xmlDoc.createElement("edition");
Attr newAtt = xmlDoc.createAttribute("edition");
  1. A.True
  2. B.False
Q28
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.1. Introduction to XML DOM (Document Object Model)Medium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
For which of the following application scenarios is a DOM-based parsing model highly recommended and preferred over a SAX-based parsing model?
  1. A.When you need to modify the XML document directly, or require random-access to traverse element nodes in any order.
  2. B.When execution performance and/or memory consumption is a critical system bottleneck.
  3. C.When you only need to process the XML document sequentially from top to bottom.
  4. D.When you are parsing exceptionally large files and want to minimize memory usage.
Q29
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.16. Traversing and Navigating the Node TreeEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In XML DOM programming, the term traversing is defined as which of the following operational actions on a node tree?
๐Ÿ’ป javascript Snippet
var x = xmlDoc.documentElement.childNodes;
for (var i = 0; i < x.length; i++) {
    if (x[i].nodeType == 1) {
        console.log(x[i].nodeName);
    }
}
  1. A.Printing individual leaf elements to the browser console
  2. B.Looping through or traveling across the node tree hierarchy to extract element values
  3. C.Programmatically adding new attributes to an element node
  4. D.Spinning or rendering 3D graphic models from XML metadata
Q30
โ“ MCQ๐Ÿ“˜ CS311๐Ÿ“‘ Lec 13๐Ÿท๏ธ 13.1. Introduction to XML DOM (Document Object Model)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
True or False: The W3C Document Object Model (DOM) specification defines standard sub-interfaces (such as HTML DOM) that allow scripts and programs to dynamically access, update, and manipulate HTML documents.
๐Ÿ’ป javascript Snippet
document.getElementById("demo").innerHTML = "Hello World!";
  1. A.True
  2. B.False