Originally posted by mary morris:
Thanks for your reply Dan and Don, so it is well formed, but not valid?
2. What are the four interfaces of SAX?
a) DocumentHandler, ErrorHandler, DTDHandler, EntityResolver
b) DocumentHandler, ErrorHandler, DTDHandler, EntityHandler
c) DocumentHandler, Errorhandler, DTDHandler, SchemaHandler
d) None of these
3. What does "characters()" method stand for?
a) a method of DOM API to insert character data in the XML document.
b) a method of the SAX DocumentHandler interface to receive notification of the
character data.
c) a method of the DOM interface to replace the entity reference with the character
data.
d) None of these.
My answer : d
Kris answer: b
4. There is XML data document which is very large. The application is to extract the very few of its information from document. The memory & speed may be a constraint. Which is the most likely method to be implemented?
a) Extract the information using SAX API, event based methods.
b) To extract the information using DOM API.
c) To extract the necessary information and process using XSLT.
d) To use schema based approach.
6. When Processing Instructions are a part of your parsing process, DOM should be used, since SAX cannot be used to detect a Processing Instruction in a document.
a)true
b)false
7. Consider a system which is memory & 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 docuements
b) Use DOM based approach.
c) Using SAX based approach is the best.
d) DOM and SAX must be used in this context.
11. Use of SAX based parser is most likely to be used in which of the following scenarios?
a) You want to process the document in a sequential order only.
b) The documents is very large.
c) When there is no need to validate XML documents.
d) The parser implements only SAX based approach.
12. DOM can be used to process the HTML documents also.
a)true
b)false