Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Information Modelling doubts

 
Jayadev Pulaparty
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friends,
I took the following test and have some doubts regarding the answers. Please clarify.
http://www.javaranch.com/xml/XML_DOM_SAX.htm
=================================================
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.
The answer to this question is given as "true".
I think this is false, as SAX "can" get the notification for a processing instruction using the processingInstruction( ) method provided on the ContentHandler interface. We can subclass the DefaultHandler adapter class and override this method to act upon the notification.
================================================
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?
The answer to this is given as DOM and not SAX.
Can someone please explain in detail the reason? I'm still not very clear about when to use SAX, DOM, XSLT. Can someone give a clear break down of the selection criterion.
=================================================
Thanks.
 
Rakesh Gudur
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jayadev,
Unfortunately there are some mistakes in the answers. In both the cases, I think your answers should be correct.
Please go with what you think is right if you have enough reasoning and proof. Many a times I too came across some such mistakes.
Good luck,
Rakesh.
IBM Certified Developer -XML and related technologies
It is pardonable to aim high and miss, but it is unpardonable to aim low - A Gujarathi Industrialist
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic