MCQ Bank
Which method does DOM use for processing XML documents?
- A) Tree Based
- B) DocumentHandler
- C) Event Based
- D) Document
Which component of the following JDOM Parser represents comments in a XML document?
- A) Comment
- B) Element
- C) Text
- D) Attribute
Converting an XML content into a Java Object is called _________.
- A) Un-Marshalling
- B) Transforming
- C) Object Conversion
- D) Marshalling
Which of the followings is the best description of the "characters()" method?
- A) It is a method of DOM API to insert character data in the XML document.
- B) It is a method of the DOM interface to replace the entity reference with the character data.
- C) None of the given options.
- D) It is a method of the SAX ContentHandler interface to receive notification of the presence of character data.
In which scenario(s), you will use a JDOM Parser?
- A) You are a java developer and want to leverage java optimized parsing of XML.
- B) Both of the above.
- C) You need to use the information in the document more than once.
- D) None of the given options.
Which of the following is not a valid JDOM most common class.
- A) SAXBuilder
- B) Text
- C) Comment
- D) Document
Which of the following statement(s) is/are true about SAX parsing?
- A) SAX parser reports the application program the nature of tokens that the parser has encountered as they occur.
- B) All of the given options.
- C) SAX parser reads an XML document from top to bottom, recognizing the tokens that make up a well-formed XML document.
- D) The application program provides an 'event' handler that must be registered with the parser.
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?
- A) Use platform native language to process the documents.
- B) DOM and SAX must be used in this context.
- C) Using SAX based approach is the best.
- D) Use DOM based approach.
Converting a Java object into an XML file is called _________.
- A) Marshalling
- B) Transforming
- C) Object Conversion
- D) Un-Marshalling
The cloneNode() method has a parameter :
- A) None of the given
- B) 0 or 1
- C) Yes or No
- D) True or False
Which of the following components of JDOM Parser is used to represents DOM tree?
- A) Element
- B) Text
- C) Attribute
- D) Document
JDOM is an open source java based library, which works with _______.
- A) None of the given options
- B) Both SAX APIs and DOM
- C) SAX APIs
- D) DOM
_________________refers to a means of representing information in an XML document as a business object in computer memory.
- A) DOM binding
- B) None of the given
- C) JAXP binding
- D) XML binding
Which of the following statement(s) is/are true about SAX parsing?
- A) The application program provides an 'event' handler that must be registered with the parser.
- B) All of the given options.
- C) SAX parser reports the application program the nature of tokens that the parser has encountered as they occur.
- D) SAX parser reads an XML document from top to bottom, recognizing the tokens that make up a well-formed XML document.
In SAX parsing, which of the following method is used to read contents?
- A) startDocument()
- B) endElement()
- C) characters()
- D) startElement()
Suppose you need to develop an application that will extract a small portion of the information from a very large XML document. Memory and speed may be constraints. Which of the following approach (method) you will use for development of your application.
- A) Use SAX
- B) Use a schema-based approach.
- C) Extract the necessary information and process using XSLT.
- D) Use DOM
Which method does SAX use for processing XML documents?
- A) DocumentHandler
- B) Event Based
- C) Document
- D) Tree based
Converting an XML content into a Java Object is called _________.
- A) Marshalling
- B) Un-Marshalling
- C) Transforming
- D) Object Conversion
The servlet example can be created by ________ ways.
- A) 4
- B) 5
- C) 3
- D) 2
The service() method checks the ________ request type (GET, POST, PUT, DELETE, etc.) and calls doGet, doPost, doPut, doDelete, etc. methods as appropriate.
- A) HTPP
- B) HTML
- C) HTTP
- D) HTIP