Forum

Notifications
Clear all

CS311 Quiz 2 Solved


admin
Posts: 978
Admin
Topic starter
(@shahzain)
Member
Joined: 2 years ago

 

1) The servlet is terminated by calling the _________ method.

  1. End ()
  2. Terminate ()
  3. Destroy ()
  4. Servlet ()

 

2) Which component of the following JDOM Parser represents comments in an XML document

  1. Comment
  2. Element
  3. Text
  4. Attribute

 

3) Which of the following statement is correct about Marshalling

  1. Used to write data in XML documents
  2. Can be used for both writing/reading purposes
  3. Used to read data from XML documents
  4. None of the given

 

4) A servlet life cycle can be defined as the entire process from its creation till the _________.

  1. Construction
  2. Destruction
  3. Initialization
  4. Constructor

 

5) The servlet is initialized by calling the ______ method.

  1. Destroy ()
  2. Servlet ()
  3. Service ()
  4. Init ()

 

6) Consider a system (application) which have memory and speed constraint. The application is to process XML documents, sort the contents and mail them to a higher configuration machine for transformation. Which is the best approach

  1. Using SAX based approach is the best.
  2. DOM and SAX must be used in this context.
  3. Use DOM based approach
  4. Use platform native language to process the documents

 

7) Methods such as start Document, end Document, start Element, and end Element are invoked by _____________.

  1. Default Handler
  2. Error Handler
  3. Content Handler
  4. DTD Handler

 

8) JDOM is an open-source java-based library, which works with _________

  1. SAX APIs
  2. Both SAX APIs and DOM
  3. DOM
  4. None of the given options

 

9) Converting a Java object into an XML file is called _________.

  1. Transforming
  2. Object Conversion
  3. Un-Marshalling
  4. Marshalling

 

10) In SAX parsing, which of the following method is used to read contents

  1. Start Element ()
  2. End Element ()
  3. Start Document ()
  4. Characters ()

 

Topic Tags
Share:
Scroll to Top