Get your CodeRanch badge!*
The moose likes XML and Related Technologies and the fly likes Design pattern in SAX parser. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Design pattern in SAX parser." Watch "Design pattern in SAX parser." New topic
Author

Design pattern in SAX parser.

Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 356
what is the design pattern used in SAX parser.


SCJP 1.4, SCWCD1.4, OCA(1Z0-007)
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
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

Joined: Jun 20, 2009
Posts: 80
DOM or SAX , JAXP uses factory design pattern.


VAMSI MOHAN.V
(SCJP5.0, IBM Rational Solution Designer, IBM Rational Architect, IBM RUP Designer)
Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 356
Vamsi,
I wanted to know for both SAX and DOM parser.
Billy Tsai
Ranch Hand

Joined: May 23, 2003
Posts: 1297
I don't know


BEA 8.1 Certified Administrator, IBM Certified Solution Developer For XML 1.1 and Related Technologies, SCJP, SCWCD, SCBCD, SCDJWS, SCJD, SCEA,
Oracle Certified Master Java EE 5 Enterprise Architect
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12671
    
    5
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


Java Resources at www.wbrogden.com
Stephan Ort
Greenhorn

Joined: Jun 08, 2010
Posts: 5
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

Joined: May 18, 2005
Posts: 356
Thanks Stephan. Also following link StAX Vs SAX talks about the patterns used by StAX and SAX
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Design pattern in SAX parser.
 
Similar Threads
xml parser
Difference between SAX parser and DOM Parser
Bulk XML messages
reading xml data
Sax parser and design pattern