Skip to content
VUBuddy

CS311 Final Term MCQs

Introduction to Web Services Development PDF 294 KBUpdated 23 Oct 2026
Final term past paper CS311 Final Term MCQs PDF 294 KB
vubuddy.com
Type
Final term past paper
Course
CS311 Introduction to Web Services Development
Size
PDF 294 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 294 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 1, 2, 3 of 21. Download the file for all 21 pages.

CS311 MCQs for Final Term

XML DOM MCQs

What does DOM stand for in XML DOM?

  1. Document Object Model
  2. Data Object Model
  3. Document Oriented Model
  4. Data Oriented Model

Answer: A) Document Object Model

Which of the following is NOT a method of the XML DOM?

  1. getElementById()
  2. createElement()
  3. appendChild()
  4. getNodeValue()

Answer: D) getNodeValue()

In XML DOM, which method is used to create a new element node?

  1. createNode()
  2. createElement()
  3. newElement()
  4. createNewNode()

Answer: B) createElement()

Which property of the XML DOM is used to access the root element of an XML document?

  1. rootElement
  2. firstChild
  3. documentElement
  4. rootNode

Answer: C) documentElement

What is the purpose of the appendChild() method in XML DOM?

  1. To remove a child node
  2. To add a new child node
  3. To replace a child node
  4. To clone a child node

Answer: B) To add a new child node

Which method is used to retrieve a list of elements with a specified tag name in XML DOM?

  1. getElementsByTagName()
  2. getElementById()
  3. getElementsByClassName()
  4. getElementsByName()

Answer: A) getElementsByTagName()

In XML DOM, what does the nodeValue property return?

  1. The name of the node
  2. The value of the node
  3. The type of the node
  4. The parent of the node

Answer: B) The value of the node

Which of the following is a valid XML DOM node type?

  1. Element
  2. Attribute
  3. Text
  4. All of the above

Answer: D) All of the above

What does the removeChild() method do in XML DOM?

  1. Adds a new child node
  2. Removes a specified child node
  3. Replaces a child node
  4. Clones a child node

Answer: B) Removes a specified child node

Which method is used to replace a child node in XML DOM?

  1. replaceChild()
  2. swapChild()
  3. changeChild()
  4. updateChild()

Answer: A) replaceChild() Absolutely! Here are some additional multiple-choice questions (MCQs) focused on XML parsing:

XML Parsing MCQs

Which of the following is a common XML parser for Java?

  1. SAX
  2. DOM
  3. JAXP
  4. All of the above

Answer: D) All of the above

What does SAX stand for in XML parsing?

  1. Simple API for XML
  2. Standard API for XML
  3. Simple Access for XML
  4. Standard Access for XML

Answer: A) Simple API for XML

Which XML parser reads the entire XML document and constructs a tree representation in memory?

  1. SAX
  2. DOM
  3. StAX
  4. Pull

Answer: B) DOM

Which of the following is a streaming XML parser?

  1. DOM
  2. SAX
  3. JDOM
  4. XOM

Answer: B) SAX

In XML parsing, what is the main advantage of using SAX over DOM?

  1. SAX is faster and uses less memory
  2. SAX is easier to use
  3. SAX supports XPath
  4. SAX can modify the XML document

Answer: A) SAX is faster and uses less memory

Which method is used to parse an XML document in a DOM parser?

  1. parseDocument()
  2. parseXML()
  3. parse()
  4. loadXML()

Answer: C) parse()

What is the main disadvantage of using DOM for XML parsing?

  1. It cannot handle large XML documents
  2. It is slower and uses more memory
  3. It does not support namespaces
  4. It cannot validate XML documents

Answer: B) It is slower and uses more memory

Which of the following is true about StAX parser?

  1. It is a pull parser
  2. It is a push parser
  3. It builds a tree structure in memory
  4. It does not support event-based parsing

Answer: A) It is a pull parser

Which method in SAX parser is called when the parser encounters the start of an element?

  1. startElement()
  2. beginElement()
  3. elementStart()
  4. on ElementStart()

Answer: A) startElement()

In XML parsing, what does the term “well-formed” mean?

  1. The XML document adheres to the XML syntax rules
  2. The XML document is validated against a DTD or schema
  3. The XML document contains no errors
  4. The XML document is properly formatted for display

Answer: A) The XML document adheres to the XML syntax rules

JAXP MCQs

Q1. What does JAXP stand for?

  1. Java API for XML Parsing
  2. Java API for XML Processing
  3. Java Application for XML Parsing
  4. Java Application for XML Processing

Answer: B) Java API for XML Processing

Q2. Which of the following is a component of JAXP?

  1. DOM
  2. SAX
  3. XSLT
  4. All of the above

Answer: D) All of the above

Q3. What is the primary purpose of JAXP?

  1. To parse XML documents
  2. To transform XML documents
  3. To validate XML documents
  4. All of the above

Answer: D) All of the above

Q4. Which JAXP interface is used to create a new instance of a DOM parser?

  1. DocumentBuilderFactory
  2. SAXParserFactory
  3. TransformerFactory
  4. XMLInputFactory

Answer: A) DocumentBuilderFactory

Q5. Which method in JAXP is used to parse an XML document using a DOM parser?

  1. parseDocument()
  2. parseXML()
  3. parse()
  4. loadXML()

Answer: C) parse()

Q6. Which JAXP class is used to perform XSLT transformations?

  1. Transformer
  2. TransformerFactory
  3. XSLTProcessor
  4. XSLTTransformer

Answer: A) Transformer

Q7. In JAXP, which method is used to create a new instance of a SAX parser?

  1. newSAXParser()
  2. createSAXParser()
  3. newInstance()
  4. newParser()

Answer: C) newInstance()

Q8. Which of the following is NOT a feature of JAXP?

  1. Platform independence
All CS311 files →
CS311 Introduction to Web Services Development All CS311 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.