Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SAX Question

 
Rinku Singh
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone,

I am preparing for SCDWSD and i have 2 questions in JAXP.

Exam Objective escribe the functions and capabilities of the APIs included within JAXP.




In RMH book they have specified SAX2 .It specifies following method to create SAXParser:

XMLReader parser = XMLReaderFactory.createXMLReader();
parser.parse(fileName);





However Mikalai Zaikin's notes specfies:

SAXParserFactory spfactory = SAXParserFactory.newInstance();
spfactory.setValidating(false);
SAXParser saxParser = spfactory.newSAXParser();




Q1. Which is correct approach for exams?

Q2. As the Exam Objective does not specify, extend of what could be asked in JAXP(Although SAX,DOM are itself major).From where should I read this topic given all the resources from Links Page.


Your help would be appreciates .

Thanks
Rinku Singh
 
vivek srivastava
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both the method is doing same thing.
if you open code for SAXparser you will come to know that SAXParser internally creates XMLReader and parse.
I found follwing code entry in SAXparser

[Edit: deleted two duplicates of this same post.]
[ October 22, 2008: Message edited by: Amit Ghorpade ]
 
Rinku Singh
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks fo answering !!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic