This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes DOM document to 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 "DOM document to Sax parser" Watch "DOM document to Sax parser" New topic

DOM document to Sax parser

Ambika Jain
Ranch Hand

Joined: Jan 27, 2005
Posts: 48

The client api provides us with a method that returns DOM document. The method processes the XML and the XML need not adhere to any schema.

In order to display the content of this document, I want to use SAX parser. Is there a way, I pass this document to SAX parser ?

Or, is there any other way to do this.

Thanks in advance,

Ambika Jain
Paul Clapham

Joined: Oct 14, 2005
Posts: 18124

I assume you have written a ContentHandler that you would like to plug into a SAXParser? Then do this:If I am not mistaken this should call the methods in your ContentHandler.
I agree. Here's the link:
subject: DOM document to Sax parser
Similar Threads
tranverse back an xml using SAX Parsers
Difference between SAX and DOM parsers
How can we store serialized object
parsing XML document against DTD!!!