Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Design pattern in SAX parser.

 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the design pattern used in SAX parser.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Simple API for XML is not a parser, it is a programming API that is used in conjunction with a parser. It looks like you have a lot to learn, good luck!

Also, the first word in English sentences is always capitalized and questions are terminated with question marks '?' not period characters.
 
Vamsi Mohan
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DOM or SAX , JAXP uses factory design pattern.
 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vamsi,
I wanted to know for both SAX and DOM parser.
 
Billy Tsai
Ranch Hand
Posts: 1304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As James already pointed out, SAX is an API, not an implementation of the API.

Now - you could talk about a Design Pattern used in a particular implementation of the API, but that would depend on the programmer who created it.

Why dont you study - for example - the Java 6 source code for the various classes in the javax.xml.parsers package and decide for yourself which patterns are being used.

Bill

 
Stephan Ort
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can look here: http://cafe.elharo.com/blogroll/stax/

I think they say SAX has to do with the observer pattern...
 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Stephan. Also following link StAX Vs SAX talks about the patterns used by StAX and SAX
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic