This question is Q. 4 of
JAVA Ranch XML Mock exams (DOM AND SAX Questions) I had thought answer should be A, as memory is constrained. However given answer is b. Expert views please.
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
Similarly, in the same exam Q 7, I had thought C should have been the answer, because of memory constraint. However as per mock, answer is B. I would be obliged if anyone can explain.
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
[ July 03, 2002: Message edited by: ZEESHAN AZIZ ]