• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Detecting PI in SAX and DOM

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Answer : a
Pls. Explain(since SAX has processing Instruction callback)
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I remember in my last failed attempt, I got a question of a similar nature. Can anyone explain in more detail.
 
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Both DOM and SAX have the mechanism to handle processing instructions. DOM has a node type ProcessingInstruction and SAX has a notification method processingInstruction() as part of its ContentHandler interface.
Hence, the answer to this has to be false in my opinion.
 
reply
    Bookmark Topic Watch Topic
  • New Topic